Simple wrapper for jsexe.exe to make it usable in Gruntfiles
There's no npm package yet, so please
copy node_modules\grunt-jsexe to your project root
Furthermore download jsexe.zip, and copy jsexe.exe
to your project root.
jsexe:{
options:{
compiler:['none', 'cc', 'best'][1],
mangle:['none', 'yes', 'best'][2],
bootstrap:['none', 'global', 'local', 'check'][1],
//bootstrapCharcode:x,
debug:true,
compilerFile: 'jsexe.exe' //points to the exe in your project root
},
dist:{
src: 'src/myAwesomeStarfield.js',
dest:'dist/demo.png.html'
}
}
A example Gruntfile is provided named Gruntfile-example.js
As it's a simple wrapper option names of JsExe have just been taken, with some convinient shortcuts.
jsexe.exe
- points to the filelocation relative to Gruntfile.js
none
- no JS compressioncc
- Closure Compiler based | also removes dead code, usenone
if you end up with a 217byte (empty) pngbest
- best
none
- disabledyes
- enabledbest
- best There's a chapter about mangling in the ZIP where you got jsexe from that explains what this is about.
###bootstrap
none
- noneglobal
- global evallocal
- local evaldebug
- debug check
###bootstrapCharcode ###bootstrapCharCode
x
- store String.fromCharCode in variable x
###debug
true
- output intermediate files
Note that this description has been taken straight from the exe, and there are ByteOrder and PNG optimizer which have not been made available through the wrapper (yet).
Was done by the adinpsz people, information about JsExe. Make sure to buy these guys a beer, they shrink JS code in a PNG so small it's unbelievable!
- so far this is only a draft, it does work, but you get some nice ASCI art instead of the spinner jsexe shows
- there's no NPM yet, and thus no package file
- the exe might change options, that are not available through the wrapper