Skip to content

Instantly share code, notes, and snippets.

@ahmadshah
Last active January 1, 2016 17:39
Show Gist options
  • Save ahmadshah/8178926 to your computer and use it in GitHub Desktop.
Save ahmadshah/8178926 to your computer and use it in GitHub Desktop.
Grunt Setup
module.exports = function(grunt) {
grunt.initConfig({
shell: {
myth: {
command: function() {
return 'myth css/myth/input.css css/style.css';
},
options: {
stdout: true,
stderr: true,
failOnError: true
}
}
},
cssmin: {
banner: {
options: {
banner: '/* Generated using Myth.io Processor */'
},
files: {
'css/style.min.css': ['css/style.css']
}
}
},
notify: {
buildcss: {
options: {
message: 'CSS build is completed'
}
}
},
watch: {
options: {
livereload: true
},
css: {
files: ['css/myth/*.css'],
tasks: ['shell', 'cssmin', 'notify:buildcss']
}
}
});
grunt.loadNpmTasks('grunt-shell');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-notify');
grunt.registerTask('default', ['watch']);
}
{
"name": "WorldOfHerbs",
"version": "2.0.0",
"devDependencies": {
"grunt": "~0.4.2",
"grunt-shell": "~0.6.1",
"grunt-contrib-cssmin": "~0.7.0",
"grunt-contrib-watch": "~0.5.3",
"grunt-notify": "~0.2.16"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment