@@ -105,7 +105,19 @@ module.exports = function (grunt)
105
105
dest : 'public/'
106
106
}
107
107
]
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
+ } ,
109
121
} ,
110
122
111
123
// Check code quality of Gruntfile.js and site-specific JavaScript using JSHint.
@@ -152,37 +164,31 @@ module.exports = function (grunt)
152
164
}
153
165
} ,
154
166
155
- // Generate filename timestamps within templates/mockup files .
167
+ // Generate filename timestamps and version numbers .
156
168
replace : {
157
169
theme : {
158
170
options : {
159
171
patterns : [
160
172
{
161
173
match : 'timestamp' ,
162
174
replacement : '<%= opt.timestamp %>'
175
+ } ,
176
+ {
177
+ match : 'version' ,
178
+ replacement : '<%= pkg.version %>'
163
179
}
164
180
]
165
181
} ,
166
182
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
- } ,
179
183
// Copy Textpattern templates to themes directory.
180
184
{
181
185
expand : true ,
182
186
cwd : '<%= paths.src.templates %>' ,
183
- src : '**' ,
187
+ src : [ '**' , '!manifest.json' ] ,
184
188
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' }
186
192
]
187
193
}
188
194
} ,
0 commit comments