1-
21module . exports = function ( grunt ) {
32 var srcPath = [ "scripts/**/*.js" ] ;
3+ var stylePath = [ "styles/main.css" , "styles/docs.css" ] ;
44 var testePath = "spec/*Spec.js" ;
5- var libPaths = [ 'polyfills/polyfill.js' , 'bower_components/jquery/dist/jquery.min.js' , 'bower_components/flatdoc/legacy.js' , 'bower_components/flatdoc/flatdoc.js' , 'scripts/flatdoc-theme.js' , 'bower_components/angular/angular.js' , 'bower_components/angular-route/angular-route.js' , 'bower_components/js-schema/js-schema.min.js' , 'bower_components/google-code-prettify/bin/prettify.min.js' , 'bower_components/bootstrap/dist/js/bootstrap.min.js' ] ;
5+ var libPaths = [ 'polyfills/polyfill.js' , 'bower_components/jquery/dist/jquery.min.js' , 'bower_components/flatdoc/legacy.js' , 'bower_components/flatdoc/flatdoc.js' , 'scripts/flatdoc-theme.js' , 'bower_components/angular/angular.js' , 'bower_components/angular-route/angular-route.js' , 'bower_components/js-schema/js-schema.min.js' , 'bower_components/google-code-prettify/bin/prettify.min.js' , 'bower_components/bootstrap/dist/js/bootstrap.min.js' ] ;
66 grunt . initConfig ( {
77 concat : {
88 default : {
@@ -12,7 +12,7 @@ module.exports = function(grunt) {
1212 }
1313 } ,
1414 src : srcPath ,
15- dest : 'dist/main.js' ,
15+ dest : 'dist/js/ main.js' ,
1616 }
1717 } ,
1818 jshint : {
@@ -28,59 +28,70 @@ module.exports = function(grunt) {
2828 } ,
2929 dist : {
3030 files : {
31- 'dist/main.min.js' : [ srcPath ]
31+ 'dist/js/ main.min.js' : [ srcPath ]
3232 }
3333 } ,
3434 unicfile : {
35- files : {
36- 'dist/main.unique.js' : libPaths . concat ( [ srcPath ] )
37- }
35+ files : {
36+ 'dist/js/main.unique.js' : libPaths . concat ( [ srcPath ] )
3837 }
39- } ,
38+ }
39+ } ,
40+ cssmin : {
41+ dev : {
42+ options : {
43+ report : "min"
44+ } ,
45+ src : stylePath ,
46+ dest : "dist/css/main.min.css" ,
47+ }
48+ } ,
4049 jasmine : {
41- pivotal : {
42- src : [ srcPath ] ,
43- options : {
44- specs : testePath ,
45- helpers : 'spec/*Helper.js' ,
46- vendor : libPaths , /*
47- template: require('grunt-template-jasmine-istanbul'),
48- templateOptions: {
49- coverage: 'bin/coverage/coverage.json',
50- report: 'bin/coverage',
51- thresholds: {// we will use this soon
52- lines: 100,
53- statements: 100,
54- branches: 100,
55- functions: 100
56- }
57- }*/
58- }
59- }
60- } ,
50+ pivotal : {
51+ src : [ srcPath ] ,
52+ options : {
53+ specs : testePath ,
54+ helpers : 'spec/*Helper.js' ,
55+ vendor : libPaths ,
56+ /*
57+ template: require('grunt-template-jasmine-istanbul'),
58+ templateOptions: {
59+ coverage: 'bin/coverage/coverage.json',
60+ report: 'bin/coverage',
61+ thresholds: {// we will use this soon
62+ lines: 100,
63+ statements: 100,
64+ branches: 100,
65+ functions: 100
66+ }
67+ }*/
68+ }
69+ }
70+ } ,
6171 watch : {
6272 scripts : {
6373 files : [ srcPath , testePath ] ,
64- tasks : [ 'jshint' , 'uglify' , 'concat' , 'jasmine' ] ,
74+ tasks : [ 'jshint' , 'uglify' , 'concat' , 'jasmine' ] ,
6575 options : {
6676 spawn : false ,
6777 } ,
6878 } ,
6979 } ,
7080 bump : {
71- options : {
72- files : [ 'bower.json' ] ,
73- commitFiles : [ "-a" ] ,
74- push : false
75- }
81+ options : {
82+ files : [ 'bower.json' ] ,
83+ commitFiles : [ "-a" ] ,
84+ push : false
85+ }
7686 }
7787 } ) ;
7888
7989 grunt . loadNpmTasks ( 'grunt-contrib-jshint' ) ;
80- grunt . loadNpmTasks ( 'grunt-bump' ) ;
90+ grunt . loadNpmTasks ( 'grunt-bump' ) ;
8191 grunt . loadNpmTasks ( 'grunt-contrib-uglify' ) ;
92+ grunt . loadNpmTasks ( 'grunt-contrib-cssmin' ) ;
8293 grunt . loadNpmTasks ( 'grunt-contrib-concat' ) ;
8394 grunt . loadNpmTasks ( 'grunt-contrib-watch' ) ;
8495 grunt . loadNpmTasks ( 'grunt-contrib-jasmine' ) ;
85- grunt . registerTask ( 'default' , [ 'jshint' , 'jasmine' , 'concat:default' , 'uglify' ] ) ;
86- } ;
96+ grunt . registerTask ( 'default' , [ 'jshint' , 'jasmine' , 'concat:default' , 'uglify' , 'cssmin' ] ) ;
97+ } ;
0 commit comments