Skip to content

Instantly share code, notes, and snippets.

@mherchel
Created November 12, 2014 23:45
Show Gist options
  • Save mherchel/d333da1845e5a52cbe37 to your computer and use it in GitHub Desktop.
Save mherchel/d333da1845e5a52cbe37 to your computer and use it in GitHub Desktop.
Libsass/Nodesass/Grunt
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
watch: {
sass: {
files: ['sass/**/*.{scss,sass}','sass/_partials/**/*.{scss,sass}'],
tasks: ['sass:dist']
},
livereload: {
files: ['*.html', '*.php', 'js/**/*.{js,json}', 'css/*.css','img/**/*.{png,jpg,jpeg,gif,webp,svg}'],
options: {
livereload: true
}
}
},
sass: {
options: {
sourceMap: true,
outputStyle: 'compressed'
},
dist: {
files: {
'css/styles.css': 'sass/styles.scss'
}
}
}
});
grunt.registerTask('default', ['sass:dist', 'watch']);
grunt.loadNpmTasks('grunt-sass');
grunt.loadNpmTasks('grunt-contrib-watch');
};
{
"name": "Node Sass",
"version": "0.0.1",
"description": "",
"main": "Gruntfile.js",
"dependencies": {
"grunt-sass": "^0.16.1"
},
"devDependencies": {
"grunt": "^0.4.5",
"grunt-contrib-watch": "^0.6.1"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Coolio",
"license": "ISC"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment