Skip to content

Commit e3e22cd

Browse files
add pug preview\not preview variants
1 parent 9069908 commit e3e22cd

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

generators/app/writing.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,15 +181,19 @@ module.exports = function () {
181181
this.fs.copy(this.templatePath('src/templates-nunjucks/page.html'), 'src/templates/index.html');
182182
}
183183
break;
184+
case 'pug':
185+
this.fs.copy(this.templatePath('src/templates-pug'), 'src/templates');
186+
if(!props.preview){
187+
this.fs.delete('src/templates/page.pug');
188+
this.fs.copy(this.templatePath('src/templates-pug/page.pug'), 'src/templates/index.pug');
189+
}
190+
break;
184191
case 'swig':
185192
this.fs.copy(this.templatePath('src/templates-swig'), 'src/templates');
186193
break;
187194
case 'jade':
188195
this.fs.copy(this.templatePath('src/templates-jade'), 'src/templates');
189196
break;
190-
case 'pug':
191-
this.fs.copy(this.templatePath('src/templates-pug'), 'src/templates');
192-
break;
193197
case 'html':
194198
this.fs.copy(this.templatePath('src/templates-html'), 'src');
195199
break;

0 commit comments

Comments
 (0)