Created
January 29, 2014 13:05
-
-
Save triblondon/8687515 to your computer and use it in GitHub Desktop.
Sample Grunt config for Origami compliant build process
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function(grunt) { | |
"use strict"; | |
grunt.initConfig({ | |
sass: { | |
docs: { | |
options: { | |
style: 'compressed', | |
loadPath: './bower_components' | |
}, | |
files: { | |
'./buildcache/bundle.css': './main.scss' | |
} | |
} | |
}, | |
browserify: { | |
dist: { | |
files: { | |
'./buildcache/bundle.js': ['./main.js'], | |
}, | |
options: { | |
transform: ['debowerify'] | |
} | |
} | |
}, | |
watch: { | |
sass: { | |
files: ['./src/scss/**'], | |
tasks: ['sass'] | |
}, | |
js: { | |
files: ['./src/js/**'], | |
tasks: ['browserify'] | |
} | |
} | |
}); | |
grunt.loadNpmTasks('grunt-contrib-sass'); | |
grunt.loadNpmTasks('grunt-browserify'); | |
grunt.loadNpmTasks('grunt-contrib-watch'); | |
// Default task(s). | |
grunt.registerTask('default', ['sass', 'browserify']); | |
grunt.registerTask('js', ['browserify']); | |
grunt.registerTask('css', ['sass']); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment