Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

build a standalone bundle

  • Loading branch information...
Prinzhorn committed Apr 16, 2018
1 parent 4a4b10b commit 3015ab0ff27e4958c09fbc4c2f9b463a075a1bf3
Showing with 20,441 additions and 14,006 deletions.
  1. +40 −0 build.sh
  2. +17,597 −3 dist/scrollmeister-extras.js
  3. +12 −0 dist/scrollmeister-extras.min.js
  4. +2,769 −13,995 dist/scrollmeister.js
  5. +12 −0 dist/scrollmeister.min.js
  6. +3 −6 package.json
  7. +4 −1 src/index-extras.js
  8. +4 −1 src/index.js
@@ -0,0 +1,40 @@
export NODE_PATH='./src'
export NODE_ENV=development

echo "Building development bundle"

./node_modules/.bin/browserify \
./src/index.js \
--standalone Scrollmeister \
-p [ browserify-banner --file ./src/banner.txt ] \
> ./dist/scrollmeister.js

echo "Building development bundle with extras"

./node_modules/.bin/browserify \
./src/index-extras.js \
--standalone Scrollmeister \
-p [ browserify-banner --file ./src/banner.txt ] \
> ./dist/scrollmeister-extras.js

export NODE_ENV=production

#Same as above plus tinyify plugin

echo "Building production bundle"

./node_modules/.bin/browserify \
./src/index.js \
--standalone Scrollmeister \
-p tinyify \
-p [ browserify-banner --file ./src/banner.txt ] \
> ./dist/scrollmeister.min.js

echo "Building production bundle with extras"

./node_modules/.bin/browserify \
./src/index-extras.js \
--standalone Scrollmeister \
-p tinyify \
-p [ browserify-banner --file ./src/banner.txt ] \
> ./dist/scrollmeister-extras.min.js

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

@@ -10,13 +10,10 @@
"flow": "flow check",
"server": "http-server",
"reload": "browser-sync start --proxy 'localhost:8080' --files 'examples/*.html, dist/scrollmeister.js'",
"watch": "NODE_PATH='./src' NODE_ENV=development watchify ./src/index-extras.js -o ./dist/scrollmeister.js -v",
"watch":
"NODE_PATH='./src' NODE_ENV=development watchify ./src/index-extras.js --standalone Scrollmeister -o ./dist/scrollmeister.js -v",
"start": "npm run server & npm run reload & npm run watch",
"build": "npm run build-scrollmeister && npm run build-extras",
"build-scrollmeister":
"NODE_PATH='./src' NODE_ENV=production browserify ./src/index.js -p tinyify -p [ browserify-banner --file src/banner.txt ] > ./dist/scrollmeister.js",
"build-extras":
"NODE_PATH='./src' NODE_ENV=production browserify ./src/index-extras.js -p tinyify -p [ browserify-banner --file src/banner.txt ] > ./dist/scrollmeister-extras.js"
"build": "./build.sh"
},
"repository": {
"type": "git",
@@ -1,5 +1,8 @@
import Scrollmeister from 'scrollmeister.js';
import './scrollmeister.sass';
import './scrollmeister.js';
import './conditions';
import './behaviors/extras.js';
import './components';

//This makes browserify --standalone work and exports Scrollmeister as an UMD module.
module.exports = Scrollmeister; //eslint-disable-line no-undef
@@ -1,5 +1,8 @@
import Scrollmeister from 'scrollmeister.js';
import './scrollmeister.sass';
import './scrollmeister.js';
import './conditions';
import './behaviors';
import './components';

//This makes browserify --standalone work and exports Scrollmeister as an UMD module.
module.exports = Scrollmeister; //eslint-disable-line no-undef

0 comments on commit 3015ab0

Please sign in to comment.
You can’t perform that action at this time.