@@ -65,12 +65,6 @@ module.exports = function (grunt) {
6565 dest : 'docs' ,
6666 expand : true
6767 } ,
68- styles : {
69- cwd : 'styles/' ,
70- src : [ '*.css' , '!*.min.css' ] ,
71- dest : 'dist/styles' ,
72- expand : true
73- } ,
7468 img : {
7569 cwd : 'misc/' ,
7670 src : 'patternfly-orb.svg' ,
@@ -84,11 +78,22 @@ module.exports = function (grunt) {
8478 expand : true
8579 }
8680 } ,
81+ less : {
82+ patternfly : {
83+ files : {
84+ 'dist/styles/angular-patternfly.css' : 'styles/angular-patternfly.less'
85+ } ,
86+ options : {
87+ paths : [ 'src/less/' ] ,
88+ strictMath : true
89+ }
90+ }
91+ } ,
8792 cssmin : {
8893 target : {
8994 files : [ {
9095 expand : true ,
91- cwd : 'styles' ,
96+ cwd : 'dist/ styles' ,
9297 src : [ '*.css' , '!*.min.css' ] ,
9398 dest : 'dist/styles' ,
9499 ext : '.min.css'
@@ -265,6 +270,10 @@ module.exports = function (grunt) {
265270 files : [ 'Gruntfile.js' ] ,
266271 tasks : [ 'eslint' ]
267272 } ,
273+ less : {
274+ files : [ '**/*.less' ] ,
275+ tasks : [ 'less' ]
276+ } ,
268277 test : {
269278 files : [ 'test/**/*.js' ] ,
270279 tasks : [ 'test' ]
@@ -279,7 +288,7 @@ module.exports = function (grunt) {
279288 }
280289 } ) ;
281290
282- grunt . registerTask ( 'copymain' , [ 'copy:docdata' , 'copy:fa' , 'copy:styles' , 'copy: img'] ) ;
291+ grunt . registerTask ( 'copymain' , [ 'copy:docdata' , 'copy:fa' , 'copy:img' ] ) ;
283292
284293 // You can specify which modules to build as arguments of the build task.
285294 grunt . registerTask ( 'build' , 'Create bootstrap build files' , function ( ) {
@@ -299,13 +308,13 @@ module.exports = function (grunt) {
299308 concatSrc = 'src/**/*.js' ;
300309 }
301310
302- grunt . task . run ( [ 'clean' , 'lint' , 'test' , 'ngtemplates' , 'concat' , 'ngAnnotate' , 'uglify:build' , 'cssmin' , 'copymain' , 'ngdocs' , 'clean:templates' ] ) ;
311+ grunt . task . run ( [ 'clean' , 'lint' , 'test' , 'ngtemplates' , 'concat' , 'ngAnnotate' , 'uglify:build' , 'less' , ' cssmin', 'copymain' , 'ngdocs' , 'clean:templates' ] ) ;
303312 } ) ;
304313
305314 // Runs all the tasks of build with the exception of tests
306315 grunt . registerTask ( 'deploy' , 'Prepares the project for deployment. Does not run unit tests' , function ( ) {
307316 var concatSrc = 'src/**/*.js' ;
308- grunt . task . run ( [ 'clean' , 'lint' , 'ngtemplates' , 'concat' , 'ngAnnotate' , 'uglify:build' , 'cssmin' , 'copymain' , 'ngdocs' , 'clean:templates' ] ) ;
317+ grunt . task . run ( [ 'clean' , 'lint' , 'ngtemplates' , 'concat' , 'ngAnnotate' , 'uglify:build' , 'less' , ' cssmin', 'copymain' , 'ngdocs' , 'clean:templates' ] ) ;
309318 } ) ;
310319
311320 grunt . registerTask ( 'default' , [ 'build' ] ) ;
0 commit comments