It's a tool for traverse all the dependencies of js modules, and write the imported css or js files to the html files!
It's a tool for dolphinjs to traverse the modules of one html file.
This plugin requires Grunt
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
npm install grunt-module-traversal --save-dev
You can run the testcase. change you path to ./node_modeules/grunt-module-traversal/, and run grunt. You could see the result file ./test/test_new.html was created! The ./Gruntfile.js has the base function of this task, so you could use it as that. If you have any question, you can contact me at sina weibo: http://weibo.com/ginano
In your project's Gruntfile, add a section named
moduleTraversal to the data object passed into
gruntinitConfigmoduleTraversal:your_target:// Target-specific file lists and/or options go here.