Build System
- Use grunt.js
- Separate out packaged transforms
- Minify with uglify.js or Google Closure Compiler
- Run unit tests on command line
- Run jshint and unit tests before building
- Build with r.js
- option to build with all/some/none of effect and transform plugins included
- In-browser build tool in addition to command line
I would suggest gulp.js over grunt.js simply because gulp is much more readable, google closure compiler will require java afaik or use it as a service, I have used both google closure and uglify in multiple projects. Google closure does compress more but it requires extra stuff and annotations to not mess-up the code uglify is easier to set-up and doesn't destroys the code (unsafe is off by default).
Yes, I agree. I'm also playing with webpack. I need to spend some more time with it to figure out the best way to structure dependencies, declarations, etc. On Feb 10, 2015 4:02 PM, "Abhishek Hingnikar" [email protected] wrote:
I would suggest gulp.js over grunt.js simply because gulp is much more readable.
— Reply to this email directly or view it on GitHub https://github.com/brianchirls/Seriously.js/issues/31#issuecomment-73782974 .
Webpack is damn cool because of its ability to load and package arbitary formats but then browserify has transforms.
// just for the sake of suggestion You might also want to look at the Module Syntax in ES6 / ES2015 (hereby). Currently we use 6to5ify in our production apps and rely on ES2015 style loading powered by browserify (internally), and it has worked pretty well of a solution for us.
The ES2015 syntax also makes both the sides (requireJS and commonJS) happy.
PS The advantages of ES6 classes will make the code much readable as a bonus :D
I just made a pull request https://github.com/brianchirls/Seriously.js/pull/105 adding a simple gulp build script.
gulp build
includes the ability to only include certain effects e.g.,
gulp build --inc "hue-saturation invert"
or
gulp build --exc "sketch"
There is a also tasks for "test" but currently fails. And task for "jshint" -- lots of errors.
Another important and useful point to autogenerate documentation from source. It will remove the need to maintain the API wiki. Once set up, and the code is annotated properly, one less thing to worry about.
@brianchirls how goes with all this improvement ? did you have any time ?
Thanks