Skip to content
This repository has been archived by the owner on Oct 17, 2021. It is now read-only.

Use rollup, ship es6 in NPM, and update core version to 0.11.0. #191

Merged
merged 18 commits into from
May 17, 2018

Conversation

nsthorat
Copy link

@nsthorat nsthorat commented May 15, 2018

This change does the following:

  • Update core version to 0.11.0 which has the es6 build.
  • Convert to rollup for bundling. Remove browserify.
  • Use "extend: true" to extend a global "tf" object. There is now no "tfc" or "tfl".
  • Ship es6 in a dist-es6 folder as well as es5.
  • Remove models. They don't build anymore nor are they useful. We'll keep the KNN image classifier around and not unit test it just so we have the code. I'll remove this at some point in the future.

This PR goes along with:
tensorflow/tfjs-core#1037
tensorflow/tfjs#301

I tested with yalc across all packages, and eventually all the way to the mobilenet example in tfjs-example and everything seems to work. Using the bundles I've also used the code on the homepage to train a simple layers model (tested both union and including layers and core independently).

Hosted bundles here:
https://storage.googleapis.com/dljs-test/rollup/tf.js
https://storage.googleapis.com/dljs-test/rollup/tf.min.js
https://storage.googleapis.com/dljs-test/rollup/tf-core.js
https://storage.googleapis.com/dljs-test/rollup/tf-core.min.js
https://storage.googleapis.com/dljs-test/rollup/tf-layers.js
https://storage.googleapis.com/dljs-test/rollup/tf-layers.min.js

This change is Reviewable

@nsthorat nsthorat changed the title NOT READY: Use rollup for bundling the ES5 bundle. NOT READY: Use rollup. May 15, 2018
@nsthorat nsthorat changed the title NOT READY: Use rollup. NOT READY: Use rollup & ship es6 in NPM. May 15, 2018
nsthorat pushed a commit to tensorflow/tfjs-core that referenced this pull request May 17, 2018
BREAKING "tfc" => "tf" for ES5 tf-core.js bundle users.

This change does the following:
- Convert to rollup for bundling. Remove browserify.
- Use "extend: true" to extend a global "tf" object. There is now no "tfc".
- Ship es6 in a dist-es6 folder as well as es5.
- Remove models. They don't build anymore nor are they useful. We'll keep the KNN image classifier around and not unit test it just so we have the code. I'll remove this at some point in the future.

This PR goes along with:
tensorflow/tfjs-layers#191
tensorflow/tfjs#301

I tested with yalc across all packages, and eventually all the way to the mobilenet example in tfjs-example and everything seems to work. Using the bundles I've also used the code on the homepage to train a simple layers model (tested both union and including layers and core independently).

Hosted bundles here:
https://storage.googleapis.com/dljs-test/rollup/tf.js
https://storage.googleapis.com/dljs-test/rollup/tf.min.js
https://storage.googleapis.com/dljs-test/rollup/tf-core.js
https://storage.googleapis.com/dljs-test/rollup/tf-core.min.js
https://storage.googleapis.com/dljs-test/rollup/tf-layers.js
https://storage.googleapis.com/dljs-test/rollup/tf-layers.min.js
@nsthorat nsthorat changed the title NOT READY: Use rollup & ship es6 in NPM. NOT READY: Use rollup, ship es6 in NPM, and update core version to 0.11.0. May 17, 2018
@nsthorat nsthorat changed the title NOT READY: Use rollup, ship es6 in NPM, and update core version to 0.11.0. Use rollup, ship es6 in NPM, and update core version to 0.11.0. May 17, 2018
@nsthorat nsthorat requested a review from caisq May 17, 2018 17:46
@caisq
Copy link
Contributor

caisq commented May 17, 2018

:lgtm_strong:


Review status: 0 of 9 files reviewed at latest revision, all discussions resolved.


Comments from Reviewable

@nsthorat nsthorat merged commit 582c564 into master May 17, 2018
@nsthorat nsthorat deleted the rollup branch May 17, 2018 17:52
nsthorat pushed a commit to tensorflow/tfjs that referenced this pull request May 18, 2018
This change does the following:
- Convert to rollup for bundling. Remove browserify.
- Use "extend: true" to extend a global "tf" object. There is now no "tfc".
- Ship es6 in a dist-es6 folder as well as es5.
- Remove models. They don't build anymore nor are they useful. We'll keep the KNN image classifier around and not unit test it just so we have the code. I'll remove this at some point in the future.

This PR goes along with:
tensorflow/tfjs-layers#191
tensorflow/tfjs-core#1037

I tested with yalc across all packages, and eventually all the way to the mobilenet example in tfjs-example and everything seems to work. Using the bundles I've also used the code on the homepage to train a simple layers model (tested both union and including layers and core independently).

Hosted bundles here:
https://storage.googleapis.com/dljs-test/rollup/tf.js
https://storage.googleapis.com/dljs-test/rollup/tf.min.js
https://storage.googleapis.com/dljs-test/rollup/tf-core.js
https://storage.googleapis.com/dljs-test/rollup/tf-core.min.js
https://storage.googleapis.com/dljs-test/rollup/tf-layers.js
https://storage.googleapis.com/dljs-test/rollup/tf-layers.min.js
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants