forked from rails/ruby-coffee-script
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathprepublish.sh
More file actions
executable file
·13 lines (12 loc) · 894 Bytes
/
prepublish.sh
File metadata and controls
executable file
·13 lines (12 loc) · 894 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/bash
echo ";if (typeof window == 'undefined' && typeof global == 'undefined') { var global = {}; };" > coffee-react-transform.js
node node_modules/browserify/bin/cmd.js \
--require "coffee-react-transform" \
--detect-globals "false" \
--insert-global-vars "__filename,__dirname" \
--standalone "coffeeReactTransform" \
>> coffee-react-transform.js
echo ";if (typeof coffeeReactTransform == 'undefined') { var coffeeReactTransform = global.coffeeReactTransform; }" >> coffee-react-transform.js
echo ";if (typeof window == 'undefined' && typeof global == 'undefined') { var global = {}; };" > js-syntax-transform.js
cat node_modules/coffee-react-jstransform/dist/js-syntax-transform.js >> js-syntax-transform.js
echo ";if (typeof coffeeReactJSSyntaxTransform == 'undefined') { var coffeeReactJSSyntaxTransform = global.coffeeReactJSSyntaxTransform; }" >> js-syntax-transform.js