Last active
January 1, 2016 17:39
-
-
Save ahmadshah/8178926 to your computer and use it in GitHub Desktop.
Grunt Setup
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) { | |
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']); | |
} |
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
{ | |
"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