Grunt JS Tutorial #3 - Creating a Gruntfile.js
1. Add config 2. Load plugins 3. Register tasks Additional: uninstalled grunt-cli from local node-module, and installed it locally to use it
This commit is contained in:
parent
dc1211b968
commit
96dec97cd4
23
Gruntfile.js
23
Gruntfile.js
@ -0,0 +1,23 @@
|
||||
module.exports = function(grunt){
|
||||
|
||||
// Configuration
|
||||
grunt.initConfig({
|
||||
// pass in options to plugin, references to file, etc.
|
||||
|
||||
});
|
||||
|
||||
// Load plugins
|
||||
// grunt.loadNpmTasks('')
|
||||
|
||||
// Register tasks
|
||||
grunt.registerTask('run', function(){
|
||||
// task is a function with name is 'run'
|
||||
console.log('I am running');
|
||||
});
|
||||
|
||||
grunt.registerTask('sleep', function(){
|
||||
console.log('I am sleep');
|
||||
});
|
||||
|
||||
grunt.registerTask('all', ['sleep', 'run'])
|
||||
}
|
251
package-lock.json
generated
251
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -3,9 +3,7 @@
|
||||
"version": "1.0.0",
|
||||
"description": "This pratice repo is built following Youtube Tutorial series [Grunt JS Tutorial](https://www.youtube.com/watch?v=KAD-l__vek4&list=PL4cUxeGkcC9j85fkVyCzCMJDfteLtrl_y)",
|
||||
"main": "app.js",
|
||||
"dependencies": {
|
||||
"grunt-cli": "^1.3.2"
|
||||
},
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"grunt": "^1.3.0"
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user