Skip to content

Commit 76defba

Browse files
author
Pravez
committed
Updated scripts for distribution.
1 parent 5f4fcda commit 76defba

File tree

5 files changed

+17
-5
lines changed

5 files changed

+17
-5
lines changed

package-lock.json

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
"version": "0.0.1",
44
"private": false,
55
"description": "A library using TensorFlow.js for Deep Reinforcement Learning",
6-
"main": "./dist/furnish.js",
6+
"main": "./dist/index.js",
7+
"types": "./dist/index.d.ts",
78
"repository": {
89
"type": "git",
910
"url": "git+https://github.com/Pravez/FurnishJS.git"
@@ -44,7 +45,8 @@
4445
"sinon-chai": "^3.0.0",
4546
"ts-node": "^6.0.3",
4647
"tsify": "^4.0.0",
47-
"typescript": "^2.8.3"
48+
"typescript": "^2.8.3",
49+
"uglify-js": "^3.3.27"
4850
},
4951
"files": [
5052
"dist/furnish.js"

scripts/build-npm.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ set -e
44

55
rm -rf dist/
66
tsc -p .
7-
browserify --standalone Furnish src/furnish.ts -p [tsify] > dist/furnish.js
7+
browserify --standalone Furnish src/furnish.ts -p [tsify] | uglifyjs > dist/furnish.js
88
echo "Prepared bundle"
99
npm pack

src/furnish/model.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export class Model {
6262
return new Result(<Tensor> this.model.predict(x, config));
6363
}
6464

65-
fit(x: Tensor, y: Tensor) {
65+
fit(x: Tensor, y: Tensor): Promise<any> {
6666
return this.model.fit(x, y, this.fitConfig);
6767
}
6868

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"allowUnusedLabels": false,
77
"alwaysStrict": true,
88
"checkJs": false,
9-
"declaration": false,
9+
"declaration": true,
1010
"diagnostics": true,
1111
"esModuleInterop": true,
1212
"forceConsistentCasingInFileNames": true,

0 commit comments

Comments
 (0)