Skip to content

Instantly share code, notes, and snippets.

@martinrusev
Created June 4, 2014 09:18
Show Gist options
  • Select an option

  • Save martinrusev/3c0357d5ff1f091c8811 to your computer and use it in GitHub Desktop.

Select an option

Save martinrusev/3c0357d5ff1f091c8811 to your computer and use it in GitHub Desktop.
Example grunt file
module.exports = function (grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
compass: {
dist: {
options: {
sassDir: 'static/sass',
cssDir: 'static/css'
}
}
},
concat: {
css: {
src: [
'static/css/screen.css',
'static/css/chart.css',
'static/css/menu.css',
'static/css/select2.css',
'static/css/jquery-ui.css'
],
dest: 'static/css/app.css'
},
},
cssmin: {
css: {
src: 'static/css/app.css',
dest: 'static/css/app.min.css'
}
},
uglify: {
js: {
files: {
'combined.js': ['combined.js']
}
}
},
watch: {
src: {
files: ['static/sass/*'],
tasks: ['compass'],
},
scripts: {
files: ['static/css/*'],
tasks: ['concat:css','cssmin:css'],
options: {
spawn: false,
},
},
},
});
grunt.loadNpmTasks('grunt-notify');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-compass');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.registerTask('default', ['watch']);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment