Skip to content

Instantly share code, notes, and snippets.

@plcosta
Created March 10, 2014 22:35
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 plcosta/9475930 to your computer and use it in GitHub Desktop.
Save plcosta/9475930 to your computer and use it in GitHub Desktop.
'use strict';
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
watch: {
options: {
livereload: true
},
html: {
files: ['www/views/**/*.html'],
},
js: {
files: ['gruntfile.js', 'www/**/*.js'],
},
css: {
files: ['www/css/**/*.css'],
}
},
connect: {
server: {
options: {
port: 9001,
keepalive: true,
livereload: true,
hostname: 'localhost',
base: 'www',
// open: true // abrir navegador
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.option('force', true);
grunt.registerTask('default', ['connect', 'watch']);
grunt.registerTask('w', ['watch']);
grunt.registerTask('s', ['connect']);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment