provide seperate serve tasks

This commit is contained in:
Autarc 2014-11-23 04:48:05 +01:00 committed by Gion Kunz
parent f0ab33c625
commit 12b2551674
2 changed files with 12 additions and 21 deletions

View File

@ -28,25 +28,4 @@ module.exports = function (grunt) {
}
}
});
// Custom task
grunt.registerTask('server', 'Warning: deprecated task "server"', function(){
grunt.log.warn('The `server` task has been deprecated. Use `grunt serve` to start a server.');
grunt.task.run(['serve']);
});
// Custom task
grunt.registerTask('serve', 'Start a localserver and serve the files', function (target) {
if (target === 'dist') {
return grunt.task.run(['build', 'connect:dist:keepalive']);
}
grunt.task.run([
'clean:server',
'doxication',
'assemble',
'concurrent:server',
'connect:livereload',
'watch'
]);
});
};

View File

@ -35,3 +35,15 @@ test:
- 'concurrent:test'
- 'connect:test'
- 'jasmine'
live:
- 'clean:server'
- 'doxication'
- 'assemble'
- 'concurrent:server'
- 'connect:livereload'
- 'watch'
preview:
- 'build'
- 'connect:dist:keepalive'