@@ -12,8 +12,7 @@ module.exports = function (grunt) {
12
12
descriptions : {
13
13
'help' : 'Task list helper for your Grunt enabled projects.' ,
14
14
'clean' : 'Deletes the content of the dist directory.' ,
15
- 'build' : 'Builds the project (including documentation) into the dist directory. You can specify modules to be built as arguments (' +
16
- 'grunt build:buttons:notification) otherwise all available modules are built.' ,
15
+ 'build' : 'Builds the project into the dist directory.' ,
17
16
'test' : 'Executes the karma testsuite.'
18
17
} ,
19
18
groups : {
@@ -29,6 +28,14 @@ module.exports = function (grunt) {
29
28
options : {
30
29
separator : ';'
31
30
} ,
31
+ ui : {
32
+ src : [ 'src/**/*UI.module.js' , 'dist/scripts/templates.js' , 'src/components/**/*.js' , 'src/filers/**/*.js' ] ,
33
+ dest : 'dist/origin-web-common-ui.js'
34
+ } ,
35
+ services : {
36
+ src : [ 'src/**/*Services.module.js' , 'src/services/**/*.js' ] ,
37
+ dest : 'dist/origin-web-common-services.js'
38
+ } ,
32
39
dist : {
33
40
src : [ 'src/**/*.module.js' , 'dist/scripts/templates.js' , 'src/**/*.js' ] ,
34
41
dest : 'dist/origin-web-common.js'
@@ -105,28 +112,11 @@ module.exports = function (grunt) {
105
112
106
113
// You can specify which modules to build as arguments of the build task.
107
114
grunt . registerTask ( 'build' , 'Create bootstrap build files' , function ( ) {
108
- var concatSrc = [ ] ;
109
-
110
- if ( this . args . length ) {
111
- this . args . forEach ( function ( file ) {
112
- if ( grunt . file . exists ( './src/' + file ) ) {
113
- grunt . log . ok ( 'Adding ' + file + ' to the build queue.' ) ;
114
- concatSrc . push ( 'src/' + file + '/*.js' ) ;
115
- } else {
116
- grunt . fail . warn ( 'Unable to build module \'' + file + '\'. The module doesn\'t exist.' ) ;
117
- }
118
- } ) ;
119
-
120
- } else {
121
- concatSrc = [ 'src/**/*.module.js' , 'src/**/*.js' ] ;
122
- }
123
-
124
115
grunt . task . run ( [ 'clean' , 'ngtemplates' , 'concat' , 'ngAnnotate' , 'less' , 'uglify:build' , 'test' ] ) ;
125
116
} ) ;
126
117
127
118
// Runs all the tasks of build with the exception of tests
128
119
grunt . registerTask ( 'deploy' , 'Prepares the project for deployment. Does not run unit tests' , function ( ) {
129
- var concatSrc = 'src/**/*.js' ;
130
120
grunt . task . run ( [ 'clean' , 'ngtemplates' , 'concat' , 'ngAnnotate' , 'less' , 'uglify:build' ] ) ;
131
121
} ) ;
132
122
0 commit comments