Investigate Grunt support
Once the feross branch is merged into master, create a new branch to investigate Grunt support as described by Ryan Bennett:
A lot of weird idioms emerge with our custom 'require' semantics since we're using commonJS functions and variables in a way that is very ndn-js specific. Hence the shim files to guarantee waf/commonJS cross compatibility.
A potential solution: Grunt (a node.js taskrunner), in combination with browserify and uglify plugins, is more than capable of being configured to generate a single compiled and minified ndn-js, ready for inclusion as a script tag, that would export all library functions as a single object. This has some advantages over waf:
- remove need for awkward shims
- avoid polluting the global scope
- clarify separation between ndn-js and dependant code
Grunt can also be configured to generate HTML documentation via JSdoc (js binding to javadoc). HTML browser tests can be streamlined significantly by utilizing mocha coupled with grunt; and can be set to autotest both node and refresh browser tests on file-change events.
Updated by Ryan Bennett over 6 years ago
Grunt is still a viable build system for sure. Since this issue was originally raised, I've also done some work with Gulp, as suggested by Felix, and I must say I'm impressed. It's a lot quicker than grunt when chaining multiple tasks together, and has all the plugins that we'd need. Either way, I maintain that moving towards a pure JS test and build system using Node.js is probably healthy for the project.