bootstrap-grunt
Introduction
bootstrap-grunt help you to configure Grunt in a maintainable way.
Grunfile grows out of control easily. bootstrap-grunt break up Grunfile into many small-reusable files with tasks & config.
Guntfile.js
module { var path = bootstrap = ; // -------------- // Initial configuration // load package.json and store it's contents in <configuration>.pkg // loadPackageJSON(String absolute_path) // if you need to do something with the configuration before loading dependencies // config(Function callback(Object config, Object package_json)) // -------------- // loading your plugins // from package.json -> .devDependencies load all grunt-* // from package.json -> .dependencies load all grunt-* // alternative method: .config(function(){ require('load-grunt-tasks')(grunt); }) // -------------- // Loading your configuration/tasks // loadConfiguration(Array from, Object options); // options has only "json_comments" atm. // *.js are required and execute it // Arguments passed: grunt, config, bootstrap // *.json are treated as config extensors // *.yml are treated as config extensors // init Grunt ; // RIP Gruntfile.js};
task: print.js
module { // set configuration or use YML/JSON instead your choice! bootstrap; // register tasks normally grunt;};
config: print.yml
print: es: options: lang: "Hola!" en: options: lang: "Hello!"
config: cssmin.json
license
MIT.