11module . exports = function ( grunt ) {
22 //Initializing the configuration object
33 grunt . initConfig ( {
4+ connect : {
5+ server : {
6+ options : {
7+ port : 8080 ,
8+ base : "." ,
9+ keepalive : true
10+ }
11+ }
12+ } ,
413 compress : {
514 main : {
615 options : {
@@ -94,7 +103,6 @@ module.exports = function(grunt) {
94103
95104 clean : {
96105 command : [ "rm -rf dist" ,
97- "rm -rf node_moduless" ,
98106 "cd openNote/style/invert/" ,
99107 "rm -rf dark light"
100108 ] . join ( "&&" )
@@ -119,8 +127,12 @@ module.exports = function(grunt) {
119127 } ,
120128 src : [
121129 "openNote.bundle.js" ,
122- "**/*.css" ,
123- "**/*.html"
130+ "node_modules/bootstrap/dist/**/*.*" ,
131+ "node_modules/codemirror/**/*.css" ,
132+ "node_modules/alertify/**/*.css" ,
133+ "openNote/**/*.*" ,
134+ "!**/*.js" , // JS Files handled webpack
135+ "!**/*.less"
124136 ] ,
125137 dest : "openNote.appcache"
126138 }
@@ -145,8 +157,10 @@ module.exports = function(grunt) {
145157 //deployment
146158 // you can run individual command using the plug-in command syntax suck as manifest:generate or shell:clean
147159 grunt . registerTask ( "build" , [ "buildDevCSS" , "shell:build" , "manifest:generate" ] ) ;
160+ grunt . registerTask ( "buildProd" , [ "buildProdCSS" , "shell:build" , "manifest:generate" ] ) ;
148161 grunt . registerTask ( "default" , [ "build" , "shell:dev" ] ) ;
149- grunt . registerTask ( "deploy" , [ "shell:clean" , "buildProdCSS" , "shell:build" , "manifest:generate" , "compress" ] ) ;
162+ grunt . registerTask ( "deploy" , [ "shell:clean" , "buildProd" , "compress" ] ) ;
163+ grunt . registerTask ( "testDeploy" , [ "shell:clean" , "buildProd" , "connect:server" ] ) ;
150164
151165 //testing
152166 grunt . registerTask ( "devmode" , [ "karma:unit" , "watch" ] ) ;
0 commit comments