-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
10 changed files
with
1,007 additions
and
585 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
82 changes: 82 additions & 0 deletions
82
internals/scripts/src/bin/write/model/folder/_templates/package.json.ejs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
{ | ||
"name": "<%- name %>", | ||
"version": "<%- version %>", | ||
"description": "<%- description %>", | ||
"keywords": <%- JSON.stringify(keywords, null, 2) %>, | ||
"author": "Kevin Scott", | ||
"license": "MIT", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/thekevinscott/upscaler.git" | ||
}, | ||
"exports": <%- JSON.stringify(exports, null, 2) %>, | ||
"module": "<%- module %>", | ||
"types": "<%- types %>", | ||
"umd:main": "<%- umdMain %>", | ||
"scripts": <%- JSON.stringify(Object.keys(scripts).reduce((obj, scriptName) => ({ | ||
...obj, | ||
[scriptName]: 'wireit', | ||
}), { | ||
"lint": "wireit", | ||
"prepublishOnly": "wireit", | ||
"validate:build": "wireit", | ||
"scaffold": "wireit", | ||
"build:umd:tsc": "wireit", | ||
"build:umd:index": "wireit", | ||
"build:umd:rollup:index": "wireit", | ||
"build:umd:uglify:index": "wireit", | ||
}), null, 2) %>, | ||
"files": [ | ||
"assets/**/*", | ||
"license", | ||
"models/**/*", | ||
"dist/**/*" | ||
], | ||
"peerDependencies": { | ||
"@tensorflow/tfjs": "~4.11.0" | ||
}, | ||
"devDependencies": { | ||
"@tensorflow/tfjs": "~4.11.0", | ||
"@tensorflow/tfjs-core": "~4.11.0", | ||
"@tensorflow/tfjs-layers": "~4.11.0", | ||
"@tensorflow/tfjs-node": "~4.11.0", | ||
"@tensorflow/tfjs-node-gpu": "~4.11.0", | ||
"seedrandom": "3.0.5", | ||
"wireit": "^0.14.0" | ||
}, | ||
"@upscalerjs": { | ||
"title": "<%- title %>", | ||
<% if (!!locals.models) { %>"models": <%- JSON.stringify(models, null, 2) %>,<% } %> | ||
"modelFamily": "<%- modelFamily %>" | ||
}, | ||
"wireit": <%- JSON.stringify(Object.entries(scripts).reduce((obj, [name, value]) => ({ | ||
...obj, | ||
[name]: value, | ||
}), { | ||
"lint": { | ||
"command": "eslint -c ../.eslintrc.js src --ext .ts", | ||
"dependencies": [ | ||
"scaffold" | ||
] | ||
}, | ||
"prepublishOnly": { | ||
"command": "pnpm lint && pnpm build && pnpm validate:build" | ||
}, | ||
"scaffold": { | ||
"command": "node -e 'const fs = require(\"fs\"); const {name, version} = require(\"./package.json\"); fs.writeFileSync(\"./src/constants.generated.ts\", `export const NAME = \"${name}\";\\nexport const VERSION=\"${version}\"`, \"utf-8\");'", | ||
"files": [ | ||
"package.json" | ||
], | ||
"output": [ | ||
"./src/constants.generated.ts" | ||
] | ||
}, | ||
"build:umd:tsc": { | ||
"command": "tsc -p ./tsconfig.umd.json --outDir ./dist/umd-tmp" | ||
}, | ||
"build:umd:index": { | ||
"command": "pnpm build:umd:rollup:index && pnpm build:umd:uglify:index" | ||
}, | ||
}), null, 2) %> | ||
} | ||
|
Oops, something went wrong.