@@ -82,6 +82,37 @@ module.exports = function (grunt) {
8282 src : [ 'canvas-dot-grid.png' ] ,
8383 dest : 'dist/imgs' ,
8484 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+ }
85116 }
86117 } ,
87118 less : {
@@ -298,7 +329,7 @@ module.exports = function (grunt) {
298329 }
299330 } ) ;
300331
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' ] ) ;
302333
303334 // You can specify which modules to build as arguments of the build task.
304335 grunt . registerTask ( 'build' , 'Create bootstrap build files' , function ( ) {
@@ -318,13 +349,13 @@ module.exports = function (grunt) {
318349 concatSrc = 'src/**/*.js' ;
319350 }
320351
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' ] ) ;
322353 } ) ;
323354
324355 // Runs all the tasks of build with the exception of tests
325356 grunt . registerTask ( 'deploy' , 'Prepares the project for deployment. Does not run unit tests' , function ( ) {
326357 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' ] ) ;
328359 } ) ;
329360
330361 grunt . registerTask ( 'default' , [ 'build' ] ) ;
@@ -333,7 +364,7 @@ module.exports = function (grunt) {
333364 grunt . registerTask ( 'test' , [ 'karma' ] ) ;
334365 grunt . registerTask ( 'check' , [ 'lint' , 'test' ] ) ;
335366 grunt . registerTask ( 'help' , [ 'availabletasks' ] ) ;
336- grunt . registerTask ( 'server ' , [ 'ngdocs:view' ] ) ;
367+ grunt . registerTask ( 'serve ' , [ 'ngdocs:view' ] ) ;
337368 grunt . registerTask ( 'ngdocs:publish' , [ 'remove:published' , 'copy:publish' ] ) ;
338369
339370 }
0 commit comments