Skip to content

Commit 57014dc

Browse files
committed
Add useful scripts
1 parent c5cbf82 commit 57014dc

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed

scripts/compile_sources.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
echo "> Transpiling Javascript to ES2015"
2+
echo ""
3+
babel --plugins "transform-runtime" lib --ignore __tests__ --out-dir ./dist
4+
cd dist
5+
browserify --debug -t [ exposify --expose [ --react React --react-dom ReactDOM] ] \
6+
-p [ css-modulesify -o styles.css ] ./browser_exposer.js > ./browser.js
7+
cat ./browser.js | uglifyjs -c > ./browser.min.js
8+
echo ""
9+
echo "> Complete transpiling Javascript to ES2015"

scripts/compile_styl.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
echo "> Start compiling Stylus to CSS"
2+
stylus lib/styles.styl --out dist/styles.css --hoist-atrules
3+
echo "> Complete compiling Stylus to CSS"

scripts/copy_bundle_to_example.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
echo "> Copying bundle to example/"
2+
3+
rm example/browser.js
4+
cp dist/browser.js example/browser.js
5+
6+
rm example/styles.css
7+
cp dist/styles.css ./example
8+
9+
echo "> Copying bundle complete."

0 commit comments

Comments
 (0)