Skip to content

Instantly share code, notes, and snippets.

@Integralist
Last active August 29, 2015 14:02
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Integralist/2cf1079f564a430d1313 to your computer and use it in GitHub Desktop.
Save Integralist/2cf1079f564a430d1313 to your computer and use it in GitHub Desktop.
Best way to modular Grunt tasks
|— Gruntfile
|— package.json
|— grunt
| – contrib-requirejs.js
module.exports = function(grunt) {
grunt.loadTasks('grunt');
};
module.exports = function(grunt) {
grunt.config('requirejs', {
compile: {
options: {
baseUrl: './app',
name: 'main',
out: './app/release/main.js'
}
}
});
grunt.loadNpmTasks('grunt-contrib-requirejs');
};
module.exports = function (grunt) {
grunt.registerTask('images', [], function() {
grunt.config('responsive_images', {
main: { ... }
});
grunt.loadNpmTasks('grunt-responsive-images');
grunt.task.run('responsive_images');
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment