Skip to content

Instantly share code, notes, and snippets.

@feliupe
Last active August 29, 2015 14:08
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 feliupe/b3e256ae0407555f0f4f to your computer and use it in GitHub Desktop.
Save feliupe/b3e256ae0407555f0f4f to your computer and use it in GitHub Desktop.
module.exports = function(grunt) {
// Load Grunt tasks declared in the package.json file
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
// Configure Grunt
grunt.initConfig({
// Grunt express - our webserver
// https://github.com/blai/grunt-express
express: {
all: {
options: {
bases: ['/home/felipe/myApps/Cssando/'],
port: 8081,
hostname: "0.0.0.0",
livereload: true
}
}
},
//"grunt-contrib-less": "^0.12.0"
less: {
development: {
options: { compress: true,
paths: ["**/"]
},
files: { 'saida.css': '**/*.less' }
}
},
// grunt-watch will monitor the projects files
// https://github.com/gruntjs/grunt-contrib-watch
watch: {
all: {
files: ['**/*.html','**/*.less'],
tasks: ['less'],
options: {
livereload: true
}
}
},
// grunt-open will open your browser at the project's URL
// https://www.npmjs.org/package/grunt-open
open: {
all: {
path: 'http://localhost:8081/index.html'
}
}
});
// Creates the `server` task
grunt.registerTask('server', [
'express',
'open',
'watch'
]);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment