Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
module.exports = function( grunt ) {
grunt.initConfig({
'http-server': {
'dev': {
root: "..",
port: 8080,
host: "0.0.0.0",
cache: 0,
showDir : true,
autoIndex: true,
ext: "html",
runInBackground: true,
logFn: function(req, res, error) { },
openBrowser : false,
customPages: {
"/readme": "README.md"
}
}
},
watch:{
options:{livereload:true},
files:['../app/**','../css/**','../templates/**', '../main.js'],
tasks:['requirejs'],
options: {
livereload: true,
}
},
requirejs: {
compile: {
options: {
baseUrl: '..', // 1
out: '../output.min.js', // 2
name: 'bower_components/almond/almond', // 3
include: 'main', // 4
mainConfigFile: '../config.js' // 5
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-requirejs');
grunt.loadNpmTasks('grunt-http-server');
grunt.registerTask('server',['http-server:dev','requirejs','watch']);
};
{
"name": "requirejs-task-runner",
"description": "Task runner for require JS",
"version": "0.0.1",
"main": "gruntfile.js",
"devDependencies": {
"grunt": "~0.4.5",
"grunt-contrib-requirejs": "~0.4.4"
},
"dependencies": {
"grunt-contrib-watch": "^1.0.0",
"grunt-http-server": "^2.0.0"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment