Skip to content

Commit

Permalink
Updated scripts for distribution.
Browse files Browse the repository at this point in the history
  • Loading branch information
Pravez committed May 23, 2018
1 parent 5f4fcda commit 76defba
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 5 deletions.
10 changes: 10 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"version": "0.0.1",
"private": false,
"description": "A library using TensorFlow.js for Deep Reinforcement Learning",
"main": "./dist/furnish.js",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"repository": {
"type": "git",
"url": "git+https://github.com/Pravez/FurnishJS.git"
Expand Down Expand Up @@ -44,7 +45,8 @@
"sinon-chai": "^3.0.0",
"ts-node": "^6.0.3",
"tsify": "^4.0.0",
"typescript": "^2.8.3"
"typescript": "^2.8.3",
"uglify-js": "^3.3.27"
},
"files": [
"dist/furnish.js"
Expand Down
2 changes: 1 addition & 1 deletion scripts/build-npm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ set -e

rm -rf dist/
tsc -p .
browserify --standalone Furnish src/furnish.ts -p [tsify] > dist/furnish.js
browserify --standalone Furnish src/furnish.ts -p [tsify] | uglifyjs > dist/furnish.js
echo "Prepared bundle"
npm pack
2 changes: 1 addition & 1 deletion src/furnish/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export class Model {
return new Result(<Tensor> this.model.predict(x, config));
}

fit(x: Tensor, y: Tensor) {
fit(x: Tensor, y: Tensor): Promise<any> {
return this.model.fit(x, y, this.fitConfig);
}

Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"allowUnusedLabels": false,
"alwaysStrict": true,
"checkJs": false,
"declaration": false,
"declaration": true,
"diagnostics": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
Expand Down

0 comments on commit 76defba

Please sign in to comment.