Skip to content
This repository was archived by the owner on Aug 15, 2019. It is now read-only.

Commit 46bc471

Browse files
authored
Add entry for Miniprogram for package.json (#1849)
* copy tf-core.min.js files for miniprogram * fix the directory
1 parent c1781ee commit 46bc471

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"types": "dist/index.d.ts",
1010
"jsnext:main": "dist/tf-core.esm.js",
1111
"module": "dist/tf-core.esm.js",
12+
"miniprogram": "dist/miniprogram",
1213
"engines": {
1314
"yarn": ">= 1.3.2"
1415
},

scripts/build-npm.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,10 @@ yarn
2222
yarn build
2323
yarn build-test-snippets
2424
yarn rollup -c --visualize
25+
26+
# Use minified files for miniprogram
27+
mkdir dist/miniprogram
28+
cp dist/tf-core.min.js dist/miniprogram/index.js
29+
cp dist/tf-core.min.js.map dist/miniprogram/index.js.map
30+
2531
echo "Stored standalone library at dist/tf-core(.min).js"

0 commit comments

Comments
 (0)