@@ -45,9 +45,10 @@ module.exports = function () {
45
45
this . fs . copy ( this . templatePath ( 'gulp/tasks/clean.js' ) , 'gulp/tasks/clean.js' ) ;
46
46
this . fs . copy ( this . templatePath ( 'gulp/tasks/server.js' ) , 'gulp/tasks/server.js' ) ;
47
47
48
- this . fs . copy ( this . templatePath ( 'gulp/tasks/index/index.html' ) , 'gulp/tasks/index/index.html' ) ;
49
- this . fs . copy ( this . templatePath ( 'gulp/tasks/list-pages.js' ) , 'gulp/tasks/list-pages.js' ) ;
50
-
48
+ if ( props . preview ) {
49
+ this . fs . copy ( this . templatePath ( 'gulp/tasks/index/index.html' ) , 'gulp/tasks/index/index.html' ) ;
50
+ this . fs . copy ( this . templatePath ( 'gulp/tasks/list-pages.js' ) , 'gulp/tasks/list-pages.js' ) ;
51
+ }
51
52
52
53
53
54
this . sprites = props . sprites ; // or in /templates/src/sass/app.sass use options.sprites
@@ -172,17 +173,14 @@ module.exports = function () {
172
173
this . fs . copyTpl ( this . templatePath ( 'src/sass/app.sss' ) , 'src/sass/app.sss' , props ) ;
173
174
}
174
175
175
-
176
-
177
-
178
-
179
-
180
176
181
177
switch ( props . templates ) {
182
178
case 'nunjucks' :
183
179
this . fs . copy ( this . templatePath ( 'src/templates-nunjucks' ) , 'src/templates' ) ;
184
- this . fs . delete ( 'src/templates/page.html' ) ;
185
- this . fs . copy ( this . templatePath ( 'src/templates-nunjucks/page.html' ) , 'src/templates/index.html' ) ;
180
+ if ( ! props . preview ) {
181
+ this . fs . delete ( 'src/templates/page.html' ) ;
182
+ this . fs . copy ( this . templatePath ( 'src/templates-nunjucks/page.html' ) , 'src/templates/index.html' ) ;
183
+ }
186
184
break ;
187
185
case 'swig' :
188
186
this . fs . copy ( this . templatePath ( 'src/templates-swig' ) , 'src/templates' ) ;
0 commit comments