You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Compile takes 2 arguments: source and destination. Source is the directory of the js2 and destination is the desired path for the outputted javascript. Add an optional "-r" to recursively traverse the source directory. Add an optional "-m=browser" (m for mode) to compile browser friendly javascript. Other modes include ringo and node.
js2 compile -r -m=node src/ lib/
js2 watch
This behaves exactly like compile, but loops every few seconds to check up on changed files. You can control the time between loops by setting "-i=N" where N is the number of seconds.
js2 watch -r -m=node src/ lib/
js2 render
Render takes a js2 file and prints the equivalent javascript. It will also use the "-m" switch.
js2 render -m=node foo.js2