Skip to content
This repository was archived by the owner on Aug 15, 2019. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ math.scope(() => {
#### ES3/ES5 JavaScript

You can also use **deeplearn.js** with plain JavaScript. Load the latest version
of the library directly from the Google CDN:
of the library from [unpkg](https://unpkg.com):

```html
<script src="https://storage.googleapis.com/learnjs-data/deeplearn-latest.js"></script>
<script src="https://unpkg.com/deeplearn"></script>
```

To use a specific version, replace `latest` with a version number
Expand Down Expand Up @@ -105,8 +105,8 @@ To build a standalone ES5 library that can be imported in the browser with a
`<script>` tag:

```bash
$ ./scripts/build-standalone.sh VERSION # Builds standalone library.
>> Stored standalone library at dist/deeplearn-VERSION(.min).js
$ ./scripts/build-standalone.sh # Builds standalone library.
>> Stored standalone library at dist/deeplearn(.min).js
```

To do a dry run and test building an npm package:
Expand Down
3 changes: 1 addition & 2 deletions demos/homepage/assets/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -222,12 +222,11 @@ ul.index {
padding: 5px 12px;
font-weight: 400;
font-size: 48px;
margin: 0 0px 2px 2px;
}

.featured-demo h1.mdl-card__title-text {
background-color: rgba(0, 0, 0, .54);
font-size: 48px;
font-size: 36px;
margin: 0 0 2px 2px;
padding: 5px 12px;
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "deeplearn",
"version": "0.2.9",
"version": "0.2.10",
"description": "Hardware-accelerated JavaScript library for machine intelligence",
"private": false,
"main": "dist/src/index.js",
Expand Down
25 changes: 5 additions & 20 deletions scripts/build-standalone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# =============================================================================
if [ -z "$1" ]
then
echo "No version number found."
exit
fi

echo "Building version $1"

npm run prep

node_modules/.bin/browserify --standalone deeplearn src/index.ts -p [tsify] > dist/deeplearn-$1.js
node_modules/.bin/uglifyjs dist/deeplearn-$1.js > dist/deeplearn-$1.min.js

cp dist/deeplearn-$1.js dist/deeplearn.js
cp dist/deeplearn-$1.min.js dist/deeplearn.min.js

cp dist/deeplearn-$1.js dist/deeplearn-latest.js
cp dist/deeplearn-$1.min.js dist/deeplearn-latest.min.js

echo "Stored standalone library at dist/deeplearn-$1(.min).js"
rm -rf dist/ && \
npm run prep && \
node_modules/.bin/browserify --standalone deeplearn src/index.ts -p [tsify] > dist/deeplearn.js && \
node_modules/.bin/uglifyjs dist/deeplearn.js > dist/deeplearn.min.js && \
echo "Stored standalone library at dist/deeplearn(.min).js"
4 changes: 2 additions & 2 deletions scripts/publish-npm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# =============================================================================
npm run prep && \
rm -rf dist/ && \
./scripts/build-standalone.sh $1 && \
npm run prep && \
./scripts/build-standalone.sh && \
node_modules/.bin/tsc && \
npm publish
echo 'Yay! Published a new package to npm.'
36 changes: 0 additions & 36 deletions scripts/publish-standalone.sh

This file was deleted.