Skip to content

Instantly share code, notes, and snippets.

@safareli
Created November 20, 2013 00:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save safareli/7554956 to your computer and use it in GitHub Desktop.
Save safareli/7554956 to your computer and use it in GitHub Desktop.
grunt base livereload + sass bootstrap
var DESTINATION = "sass";
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
compass: {
dev: {
options: {
sassDir: 'sass',
cssDir: 'css'
}
}
},
connect: {
livereload: {
options: {
hostname : "*",
livereload: true,
base: '.',
port: 8000,
},
},
server: {
options: {
hostname : "*",
base: DESTINATION,
port: 8000,
keepalive: true
}
}
},
watch: {
sass:{
files: 'sass/*.{sass,scss}',
tasks: ['compass:dev']
},
assets: {
files: ['*.html', 'css/*.css', 'js/*.js','img/*.{gif,jpeg,jpg,png,svg,webp}'],
options: {
livereload: true,
},
}
}
});
grunt.loadNpmTasks('grunt-contrib-compass');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.registerTask('default', [
'connect:livereload',
'watch'
]);
grunt.registerTask('server', [
'connect:server'
]);
};
{
"name": "name",
"version": "0.1.0",
"devDependencies": {
"connect": "~2.11.0",
"grunt": "~0.4.1",
"grunt-contrib-watch": "~0.5.3",
"grunt-contrib-connect": "~0.5.0",
"grunt-contrib-compass": "~0.6.0"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment