Skip to content

Instantly share code, notes, and snippets.

@saramarie
Created January 5, 2016 15:26
Show Gist options
  • Select an option

  • Save saramarie/66fb87d9c90044c946c3 to your computer and use it in GitHub Desktop.

Select an option

Save saramarie/66fb87d9c90044c946c3 to your computer and use it in GitHub Desktop.
Quick Front End Boiler
'use strict';
module.exports = function (grunt) {
require('time-grunt')(grunt);
require('load-grunt-tasks')(grunt);
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
sass: {
options: {
sourceMap: true
},
dist: {
files: {
'css/styles.css': 'scss/styles.scss'
}
}
},
connect: {
server: {
options: {
hostname: '127.0.0.1',
port: 9000,
base: '.',
livereload: true
}
}
},
open: {
dist: {
path: 'http://127.0.0.1:9000'
}
},
watch: {
css: {
files: 'scss/**/*.scss',
tasks: ['sass']
},
js: {
files: 'js/**/*.js'
},
html: {
files: '**/*.html'
},
options: {
livereload: true
}
}
});
grunt.registerTask('default', ['sass']);
grunt.registerTask('serve', ['connect', 'open', 'watch']);
};
{
"devDependencies": {
"grunt": "^0.4.5",
"grunt-contrib-connect": "^0.11.2",
"grunt-contrib-watch": "^0.6.1",
"grunt-open": "^0.2.3",
"grunt-sass": "^1.1.0",
"load-grunt-tasks": "^3.4.0",
"time-grunt": "^1.3.0"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment