@@ -25,7 +25,7 @@ const { ANGULAR, REACT, VUE } = baseConstants.SUPPORTED_CLIENT_FRAMEWORKS;
2525const SERVER_SRC_DIR = constants . SERVER_SRC_DIR ;
2626
2727function updateWebpackCommonJs ( ) {
28- if ( this . clientFramework === VUE || this . clientFramework === REACT ) {
28+ if ( this . clientFramework === VUE || this . clientFramework === REACT ) {
2929 this . replaceContent (
3030 `${ SERVER_SRC_DIR } ${ this . mainClientDir } /webpack/webpack.common.js` ,
3131 `${ SERVER_SRC_DIR } ${ this . mainClientDir } /` ,
@@ -54,7 +54,7 @@ function updateWebpackCommonJs() {
5454}
5555
5656function updateWebpackDevJs ( ) {
57- if ( this . clientFramework === VUE || this . clientFramework === REACT ) {
57+ if ( this . clientFramework === VUE || this . clientFramework === REACT ) {
5858 this . replaceContent (
5959 `${ SERVER_SRC_DIR } ${ this . mainClientDir } /webpack/webpack.dev.js` ,
6060 `${ SERVER_SRC_DIR } ${ this . mainClientDir } /` ,
@@ -95,7 +95,7 @@ function updateWebpackDevJs() {
9595}
9696
9797function updateWebpackProdJs ( ) {
98- if ( this . clientFramework === VUE || this . clientFramework === REACT ) {
98+ if ( this . clientFramework === VUE || this . clientFramework === REACT ) {
9999 this . replaceContent (
100100 `${ SERVER_SRC_DIR } ${ this . mainClientDir } /webpack/webpack.prod.js` ,
101101 `${ SERVER_SRC_DIR } ${ this . mainClientDir } /` ,
@@ -119,8 +119,8 @@ function updateWebpackProdJs() {
119119
120120function updateTsConfigJson ( ) {
121121 this . replaceContent ( `${ SERVER_SRC_DIR } ${ this . mainClientDir } /tsconfig.json` , '"outDir": ".*"' , '"outDir": "dist/src/app"' , true ) ;
122- this . replaceContent ( `${ SERVER_SRC_DIR } ${ this . mainClientDir } /tsconfig.json` , `${ SERVER_SRC_DIR } ${ this . mainClientDir } /` , "" , true ) ;
123- this . replaceContent ( `${ SERVER_SRC_DIR } ${ this . mainClientDir } /tsconfig.app.json` , `${ SERVER_SRC_DIR } ${ this . mainClientDir } /` , "" , true ) ;
122+ this . replaceContent ( `${ SERVER_SRC_DIR } ${ this . mainClientDir } /tsconfig.json` , `${ SERVER_SRC_DIR } ${ this . mainClientDir } /` , "" , true ) ;
123+ this . replaceContent ( `${ SERVER_SRC_DIR } ${ this . mainClientDir } /tsconfig.app.json` , `${ SERVER_SRC_DIR } ${ this . mainClientDir } /` , "" , true ) ;
124124}
125125
126126function updatePackageJson ( ) {
@@ -150,8 +150,8 @@ function updatePackageJson() {
150150 ) ;
151151}
152152
153- function updateJestConf ( ) {
154- if ( this . clientFramework === ANGULAR || this . clientFramework === REACT ) {
153+ function updateJestConf ( ) {
154+ if ( this . clientFramework === ANGULAR || this . clientFramework === REACT ) {
155155 this . replaceContent (
156156 `${ SERVER_SRC_DIR } ${ this . mainClientDir } /jest.conf.js` ,
157157 '/src/test/javascript' ,
@@ -170,7 +170,7 @@ function updateJestConf(){
170170 '..' ,
171171 true
172172 ) ;
173- } else if ( this . clientFramework === VUE ) {
173+ } else if ( this . clientFramework === VUE ) {
174174 this . replaceContent (
175175 `${ SERVER_SRC_DIR } ${ this . mainClientDir } /test/jest.conf.js` ,
176176 '/src/test/javascript' ,
@@ -192,7 +192,7 @@ function updateJestConf(){
192192 }
193193}
194194
195- function updateEsLinIgnore ( ) {
195+ function updateEsLinIgnore ( ) {
196196 this . replaceContent (
197197 `${ SERVER_SRC_DIR } ${ this . mainClientDir } /.eslintignore` ,
198198 'src/test/javascript' ,
@@ -211,16 +211,18 @@ function updateEsLinIgnore(){
211211 "" ,
212212 true
213213 ) ;
214- this . replaceContent (
215- `${ SERVER_SRC_DIR } ${ this . mainClientDir } /tsconfig.e2e.json` ,
216- `/${ SERVER_SRC_DIR } ${ this . mainClientDir } ` ,
217- "" ,
218- true
219- ) ;
214+ if ( this . protractorTests ) {
215+ this . replaceContent (
216+ `${ SERVER_SRC_DIR } ${ this . mainClientDir } /tsconfig.e2e.json` ,
217+ `/${ SERVER_SRC_DIR } ${ this . mainClientDir } ` ,
218+ "" ,
219+ true
220+ ) ;
221+ }
220222}
221223
222- function updateTestFramework ( ) {
223- if ( this . protractorTests ) {
224+ function updateTestFramework ( ) {
225+ if ( this . protractorTests ) {
224226 this . replaceContent (
225227 `${ SERVER_SRC_DIR } ${ this . mainClientDir } /test/protractor.conf.js` ,
226228 'http://localhost:8080' ,
@@ -231,7 +233,7 @@ function updateTestFramework(){
231233}
232234
233235function updateVendor ( ) {
234- this . replaceContent (
236+ this . replaceContent (
235237 `${ SERVER_SRC_DIR } ${ this . mainClientAppDir } /content/scss/vendor.scss` ,
236238 `${ SERVER_SRC_DIR } ${ this . mainClientDir } /src/content` ,
237239 ".." ,
0 commit comments