@@ -114,9 +114,12 @@ function finish() {
114114 * @function
115115 * @param {Object } conf - Information about git repositary and paths to files to delete
116116 */
117- function build ( conf ) {
117+ function build ( conf , isWPforPug ) {
118118 return new Promise ( ( resolve , reject ) => {
119119
120+ // define source path for WordPress projects or clean frontend projects (isWP_Path)
121+ let isWP_Path = isWPforPug == 'WordPress-With-Pug' ? 'assets' : 'src' ;
122+
120123 let chain = Promise . resolve ( ) ;
121124
122125 for ( var i = 0 ; i < conf . length ; i ++ ) {
@@ -168,7 +171,7 @@ function build(conf) {
168171 return new Promise ( ( resolve , reject ) => {
169172 vendor . changeVendor ( {
170173 config : config ,
171- path : './src /vendor_entries/vendor.scss' ,
174+ path : './' + isWP_Path + ' /vendor_entries/vendor.scss',
172175 addVendor : vendor . addVendorScss ,
173176 deleteVendor : vendor . deleteVendorScss
174177 } )
@@ -181,7 +184,7 @@ function build(conf) {
181184 return new Promise ( ( resolve , reject ) => {
182185 vendor . changeVendor ( {
183186 config : config ,
184- path : './src /vendor_entries/vendor.js' ,
187+ path : './' + isWP_Path + ' /vendor_entries/vendor.js',
185188 addVendor : vendor . addVendorJs ,
186189 deleteVendor : vendor . deleteVendorJs
187190 } )
@@ -215,9 +218,9 @@ function build(conf) {
215218 * @param {Object } module.emoji - Emoji module
216219 */
217220module . exports = {
218- init : function ( conf ) {
221+ init : function ( conf , isWPforPug ) {
219222 console . log ( '\nGetting starter files... ' + emoji . get ( 'runner' ) ) ;
220- build ( conf ) ;
223+ build ( conf , isWPforPug ) ;
221224 } ,
222225 emoji : emoji
223226}
0 commit comments