@@ -105,7 +105,19 @@ module.exports = function (grunt)
105105 dest : 'public/'
106106 }
107107 ]
108- }
108+ } ,
109+ // Copy mockups to mockups directory and design patterns doc to public (root) directory.
110+ html : {
111+ files : [
112+ {
113+ expand : true ,
114+ cwd : '<%= paths.src.mockups %>' ,
115+ src : '**' ,
116+ dest : '<%= paths.dest.mockups %>'
117+ } ,
118+ { 'public/design-patterns.html' : 'src/docs/design-patterns.html' }
119+ ]
120+ } ,
109121 } ,
110122
111123 // Check code quality of Gruntfile.js and site-specific JavaScript using JSHint.
@@ -152,37 +164,31 @@ module.exports = function (grunt)
152164 }
153165 } ,
154166
155- // Generate filename timestamps within templates/mockup files .
167+ // Generate filename timestamps and version numbers .
156168 replace : {
157169 theme : {
158170 options : {
159171 patterns : [
160172 {
161173 match : 'timestamp' ,
162174 replacement : '<%= opt.timestamp %>'
175+ } ,
176+ {
177+ match : 'version' ,
178+ replacement : '<%= pkg.version %>'
163179 }
164180 ]
165181 } ,
166182 files : [
167- // Copy mockups to mockups directory.
168- {
169- expand : true ,
170- cwd : '<%= paths.src.mockups %>' ,
171- src : '**' ,
172- dest : '<%= paths.dest.mockups %>'
173- } ,
174- // Copy design patterns doc to public (root) directory.
175- {
176- src : 'src/docs/design-patterns.html' ,
177- dest : 'public/design-patterns.html'
178- } ,
179183 // Copy Textpattern templates to themes directory.
180184 {
181185 expand : true ,
182186 cwd : '<%= paths.src.templates %>' ,
183- src : '**' ,
187+ src : [ '**' , '!manifest.json' ] ,
184188 dest : '<%= paths.dest.templates %>'
185- }
189+ } ,
190+ // Generate version number automatically in theme manifest.json file.
191+ { '<%= paths.dest.templates %>manifest.json' : '<%= paths.src.templates %>manifest.json' }
186192 ]
187193 }
188194 } ,
0 commit comments