Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
My Gruntfile
module.exports = function(grunt) {
grunt.initConfig({
notify: {
watch: {
options: {
title: 'Grunt Watch',
message: 'Good to go!'
}
}
},
postcss: {
options: {
map: true,
processors: [
require('autoprefixer')
]
},
dist: {
files: {
'assets/css/main.min.css': 'assets/css/main.min.css'
}
}
},
sass: {
dist: {
options: {
'style': 'compressed'
},
files: {
'assets/css/main.min.css': 'assets/sass/main.scss'
}
}
},
uglify: {
main: {
src: 'assets/js/main.js',
dest: 'assets/js/main.min.js'
},
libs: {
src: 'assets/js/libs/**/*.js',
dest: 'assets/js/libs.min.js'
}
},
watch: {
options: {
livereload: true
},
css: {
files: '**/*.scss',
tasks: ['sass', 'postcss:dist', 'notify:watch'],
},
html: {
files: 'html/**/*.html',
},
js: {
files: 'assets/js/**/*.js',
tasks: ['uglify', 'notify:watch'],
}
}
});
grunt.loadNpmTasks('grunt-notify');
grunt.loadNpmTasks('grunt-postcss');
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
};
{
"name": "joshua-base",
"version": "0.0.1",
"devDependencies": {
"autoprefixer": "^6.3.6",
"grunt": "^0.4.5",
"grunt-contrib-concat": "^0.5.1",
"grunt-contrib-sass": "^0.9.2",
"grunt-contrib-uglify": "^0.11.0",
"grunt-contrib-watch": "^0.6.1",
"grunt-grunticon": "^2.2.2",
"grunt-notify": "^0.4.3",
"grunt-postcss": "^0.7.1"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.