Skip to content
This repository has been archived by the owner on May 4, 2022. It is now read-only.

Commit

Permalink
add in grunt serve command
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Levett committed Feb 29, 2016
1 parent 716a296 commit 17dc011
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 1 deletion.
45 changes: 44 additions & 1 deletion Gruntfile.js
Expand Up @@ -9,8 +9,51 @@ module.exports = function(grunt) {
'docs/target/index.html': ['docs/index.html']
}
}
}
},
run: {
get_bower: {
cmd: 'npm',
args: [
'run',
'pretest'
]
},
build_static: {
cmd: 'npm',
args: [
'run',
'build-static'
],
options: {
wait: true
}
},
run_static: {
cmd : 'npm',
args: [
'run','static'
],
options: {
wait: false
}
}
},

watch: {
files: ['uw-frame-components/**/*'],
tasks: ['run:build_static'],
}
});

grunt.registerTask('serve', 'Compile static and watch for change so it can recompile', function(){
grunt.task.run([
'run:get_bower',
'run:run_static',
'watch'
]);
})
grunt.loadNpmTasks('grunt-run');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-processhtml');

// Default task(s).
Expand Down
2 changes: 2 additions & 0 deletions package.json
Expand Up @@ -62,7 +62,9 @@
"devDependencies": {
"bower": "^1.7.1",
"grunt": "^0.4.5",
"grunt-contrib-watch": "^0.6.1",
"grunt-processhtml": "^0.3.8",
"grunt-run": "^0.5.2",
"jasmine-core": "^2.3.4",
"karma": "^0.12.36",
"karma-chrome-launcher": "^0.1.12",
Expand Down

0 comments on commit 17dc011

Please sign in to comment.