@@ -82,6 +82,37 @@ module.exports = function (grunt) {
82
82
src : [ 'canvas-dot-grid.png' ] ,
83
83
dest : 'dist/imgs' ,
84
84
expand : true
85
+ } ,
86
+ distless : {
87
+ src : [ 'styles/**/*.less' , 'src/**/*.less' ] ,
88
+ dest : 'dist/less' ,
89
+ expand : true ,
90
+ flatten : true
91
+ } ,
92
+ distlessDependencies : {
93
+ src : [ 'node_modules/patternfly/dist/less/color-variables.less' ] ,
94
+ dest : 'dist/less/dependencies/patternfly' ,
95
+ expand : true ,
96
+ flatten : true
97
+ }
98
+ } ,
99
+ 'string-replace' : {
100
+ dist : {
101
+ files : [ {
102
+ cwd : 'dist/less/' ,
103
+ src : [ 'angular-patternfly.less' ] ,
104
+ dest : 'dist/less' ,
105
+ expand : true
106
+ } ] ,
107
+ options : {
108
+ replacements : [ {
109
+ pattern : / \. \. \/ s r c \/ ( .* ?) + \/ / g,
110
+ replacement : ''
111
+ } , {
112
+ pattern : '../node_modules/patternfly/dist/less' ,
113
+ replacement : 'dependencies/patternfly'
114
+ } ]
115
+ }
85
116
}
86
117
} ,
87
118
less : {
@@ -298,7 +329,7 @@ module.exports = function (grunt) {
298
329
}
299
330
} ) ;
300
331
301
- grunt . registerTask ( 'copymain' , [ 'copy:docdata' , 'copy:fa' , 'copy:img' , 'copy:distimg' ] ) ;
332
+ grunt . registerTask ( 'copymain' , [ 'copy:docdata' , 'copy:fa' , 'copy:img' , 'copy:distimg' , 'copy:distless' , 'copy:distlessDependencies' ] ) ;
302
333
303
334
// You can specify which modules to build as arguments of the build task.
304
335
grunt . registerTask ( 'build' , 'Create bootstrap build files' , function ( ) {
@@ -318,13 +349,13 @@ module.exports = function (grunt) {
318
349
concatSrc = 'src/**/*.js' ;
319
350
}
320
351
321
- grunt . task . run ( [ 'clean' , 'lint' , 'test' , 'ngtemplates' , 'concat' , 'ngAnnotate' , 'uglify:build' , 'less' , 'cssmin' , 'copymain' , 'ngdocs' , 'clean:templates' ] ) ;
352
+ grunt . task . run ( [ 'clean' , 'lint' , 'test' , 'ngtemplates' , 'concat' , 'ngAnnotate' , 'uglify:build' , 'less' , 'cssmin' , 'copymain' , 'string-replace' , ' ngdocs', 'clean:templates' ] ) ;
322
353
} ) ;
323
354
324
355
// Runs all the tasks of build with the exception of tests
325
356
grunt . registerTask ( 'deploy' , 'Prepares the project for deployment. Does not run unit tests' , function ( ) {
326
357
var concatSrc = 'src/**/*.js' ;
327
- grunt . task . run ( [ 'clean' , 'lint' , 'ngtemplates' , 'concat' , 'ngAnnotate' , 'uglify:build' , 'less' , 'cssmin' , 'copymain' , 'ngdocs' , 'clean:templates' ] ) ;
358
+ grunt . task . run ( [ 'clean' , 'lint' , 'ngtemplates' , 'concat' , 'ngAnnotate' , 'uglify:build' , 'less' , 'cssmin' , 'copymain' , 'string-replace' , ' ngdocs', 'clean:templates' ] ) ;
328
359
} ) ;
329
360
330
361
grunt . registerTask ( 'default' , [ 'build' ] ) ;
@@ -333,7 +364,7 @@ module.exports = function (grunt) {
333
364
grunt . registerTask ( 'test' , [ 'karma' ] ) ;
334
365
grunt . registerTask ( 'check' , [ 'lint' , 'test' ] ) ;
335
366
grunt . registerTask ( 'help' , [ 'availabletasks' ] ) ;
336
- grunt . registerTask ( 'server ' , [ 'ngdocs:view' ] ) ;
367
+ grunt . registerTask ( 'serve ' , [ 'ngdocs:view' ] ) ;
337
368
grunt . registerTask ( 'ngdocs:publish' , [ 'remove:published' , 'copy:publish' ] ) ;
338
369
339
370
}
0 commit comments