Last active
June 12, 2017 11:31
-
-
Save trkrameshkumar/2d944e81f4a882c785662c4aa27fa008 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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']); | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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