@@ -23,7 +23,7 @@ module.exports = function (grunt) {
2323 pl = require ( 'patternlab-node' ) ( config ) ;
2424
2525 function paths ( ) {
26- return require ( './patternlab- config.json' ) . paths ;
26+ return config . paths ;
2727 }
2828
2929 function getConfiguredCleanOption ( ) {
@@ -70,17 +70,14 @@ module.exports = function (grunt) {
7070 copy : {
7171 main : {
7272 files : [
73- { expand : true , cwd : path . resolve ( paths ( ) . source . js ) , src : '*.js' , dest : path . resolve ( paths ( ) . public . js ) } ,
73+ { expand : true , cwd : path . resolve ( paths ( ) . source . js ) , src : '**/* .js' , dest : path . resolve ( paths ( ) . public . js ) } ,
7474 { expand : true , cwd : path . resolve ( paths ( ) . source . css ) , src : '*.css' , dest : path . resolve ( paths ( ) . public . css ) } ,
75- { expand : true , cwd : path . resolve ( paths ( ) . source . images ) , src : [ '**/*.png' , '**/*.jpg' , '**/*.gif' , '**/*.jpeg' ] , dest : path . resolve ( paths ( ) . public . images ) } ,
75+ { expand : true , cwd : path . resolve ( paths ( ) . source . images ) , src : '*' , dest : path . resolve ( paths ( ) . public . images ) } ,
7676 { expand : true , cwd : path . resolve ( paths ( ) . source . fonts ) , src : '*' , dest : path . resolve ( paths ( ) . public . fonts ) } ,
77- { expand : true , cwd : path . resolve ( paths ( ) . source . data ) , src : 'annotations.js' , dest : path . resolve ( paths ( ) . public . data ) } ,
78- { expand : true , cwd : path . resolve ( paths ( ) . source . root ) , src : 'favicon.ico' , dest : path . resolve ( paths ( ) . public . root ) }
79- ]
80- } ,
81- styleguide : {
82- files : [
83- { expand : true , cwd : path . resolve ( paths ( ) . source . styleguide ) , src : [ '*.*' , '**/*.*' ] , dest : path . resolve ( paths ( ) . public . styleguide ) }
77+ { expand : true , cwd : path . resolve ( paths ( ) . source . root ) , src : 'favicon.ico' , dest : path . resolve ( paths ( ) . public . root ) } ,
78+ { expand : true , cwd : path . resolve ( paths ( ) . source . styleguide ) , src : [ '*' , '**' ] , dest : path . resolve ( paths ( ) . public . root ) } ,
79+ // slightly inefficient to do this again - I am not a grunt glob master. someone fix
80+ { expand : true , flatten : true , cwd : path . resolve ( paths ( ) . source . styleguide , 'styleguide' , 'css' , 'custom' ) , src : '*.css)' , dest : path . resolve ( paths ( ) . public . styleguide , 'css' ) }
8481 ]
8582 }
8683 } ,
@@ -150,13 +147,11 @@ module.exports = function (grunt) {
150147 } ) ;
151148
152149 /******************************************************
153- * COMPOUND AND ALIASED TASKS
150+ * COMPOUND TASKS
154151 ******************************************************/
155152
156- grunt . registerTask ( 'default' , [ 'patternlab' , 'copy:main' , 'copy:styleguide' ] ) ;
157- grunt . registerTask ( 'pl-serve' , [ 'patternlab' , 'copy:main' , 'copy:styleguide' , 'browserSync' , 'watch:all' ] ) ;
153+ grunt . registerTask ( 'default' , [ 'patternlab' , 'copy:main' ] ) ;
154+ grunt . registerTask ( 'patternlab:watch' , [ 'patternlab' , 'copy:main' , 'watch:all' ] ) ;
155+ grunt . registerTask ( 'patternlab:serve' , [ 'patternlab' , 'copy:main' , 'browserSync' , 'watch:all' ] ) ;
158156
159- //Aliases
160- grunt . registerTask ( 'pl-help' , [ 'patternlab:help' ] ) ;
161- grunt . registerTask ( 'pl-patterns' , [ 'patternlab:patternsonly' ] ) ;
162157} ;
0 commit comments