Skip to content

Commit

Permalink
💚 upgrade dependencies to latest versions except those that break the…
Browse files Browse the repository at this point in the history
… build
  • Loading branch information
blakek committed Nov 10, 2021
1 parent b0b9dba commit 3271365
Show file tree
Hide file tree
Showing 4 changed files with 1,992 additions and 1,658 deletions.
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@
"not op_mini all"
],
"dependencies": {
"@blakek/deep": "^2.1.1",
"@blakek/deep": "^2.2.0",
"glob": "^7.1.6",
"meow": "^8.0.0",
"meow": "^8",
"mkdirp": "^1.0.4",
"p-limit": "^3.1.0"
"p-limit": "^3"
},
"devDependencies": {
"@babel/core": "^7.12.9",
Expand All @@ -61,13 +61,13 @@
"@babel/preset-env": "^7.12.7",
"@babel/preset-typescript": "^7.12.7",
"@rollup/plugin-babel": "^5.2.2",
"@rollup/plugin-commonjs": "^17.0.0",
"@rollup/plugin-node-resolve": "^11.0.0",
"@rollup/plugin-commonjs": "^21.0.1",
"@rollup/plugin-node-resolve": "^13.0.6",
"@rollup/plugin-typescript": "^8.0.0",
"@types/glob": "^7.1.3",
"@types/mkdirp": "^1.0.1",
"@typescript-eslint/eslint-plugin": "^4.9.0",
"@typescript-eslint/parser": "^4.9.0",
"@typescript-eslint/eslint-plugin": "^5.3.1",
"@typescript-eslint/parser": "^5.3.1",
"amper-scripts": "^1.0.0-1",
"ava": "^3.13.0",
"nodemon": "^2.0.6",
Expand All @@ -76,7 +76,7 @@
"rimraf": "^3.0.2",
"rollup": "^2.34.0",
"rollup-plugin-terser": "^7.0.2",
"ts-node": "^9.0.0",
"ts-node": "^10.4.0",
"typescript": "^4.1.2"
},
"peerDependencies": {},
Expand Down
7 changes: 5 additions & 2 deletions src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import path from 'path';
import { renderToFolder } from '.';

async function main() {
const cli = meow(`
const cli = meow(
`
Usage
$ template-file <dataFile> <sourceGlob> <destination>
Expand All @@ -20,7 +21,9 @@ async function main() {
Compile all .abc files in src/ to build/
$ template-file stuff.json 'src/**/*.abc' build/
`);
`
// { importMeta: import.meta }
);

if (cli.input.length !== 3) {
cli.showHelp(2);
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export function render(template: string, data: Data): string {
(_match, sectionTag, sectionContents, replacementTag) => {
// Tag is for a repeating section
if (sectionTag !== undefined) {
const replacements = get(sectionTag, data);
const replacements = get(sectionTag, data) as Data[] | undefined;

return replacements
.map((subData: Data) => {
Expand Down
Loading

0 comments on commit 3271365

Please sign in to comment.