Skip to content

Commit 352e389

Browse files
committed
chore(*): add preprender task in build script
1 parent cc5a09d commit 352e389

3 files changed

Lines changed: 6 additions & 11 deletions

File tree

gulpfile.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,16 +93,12 @@ const addPrerenderedLobPages = (cb) => {
9393
fs.writeFile(path.resolve(__dirname, './', './dist/app-lob/angular-demos-lob/' + folder, filename), result, (err) => {
9494
if (err) {
9595
console.log(err);
96-
} else {
97-
console.log('Saved ' + filename);
9896
}
9997
});
10098
} else {
10199
fs.writeFile(path.resolve(__dirname, './', 'dist/app-lob/angular-demos-lob', filename), result, (err) => {
102100
if (err) {
103101
console.log(err);
104-
} else {
105-
console.log('Saved ' + filename);
106102
}
107103
});
108104
}

package.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"watch-live-editing": "gulp watch-live-editing",
1616
"sass-js-compile-check": "gulp sass-js-compile-check",
1717
"build": "gulp generate-live-editing && gulp overwrite-package-json && node --max_old_space_size=12192 node_modules/@angular/cli/bin/ng build --configuration production",
18-
"build:app-lob": "gulp generate-live-editing --appDv=true && gulp overwrite-package-json && node --max_old_space_size=12192 node_modules/@angular/cli/bin/ng build app-lob --configuration production",
18+
"build:app-lob": "gulp generate-live-editing --appDv=true && gulp overwrite-package-json && node --max_old_space_size=12192 node_modules/@angular/cli/bin/ng build app-lob --configuration production && gulp prerenderPages",
1919
"build:app-crm": "ng build app-crm --configuration production",
2020
"test": "ng test",
2121
"lint": "node --max_old_space_size=12192 node_modules/@angular/cli/bin/ng lint",
@@ -26,15 +26,14 @@
2626
"start:app-lob:live-editing": "gulp generate-live-editing --appDv=true && node --max_old_space_size=12192 node_modules/@angular/cli/bin/ng serve app-lob -o",
2727
"lint:app-crm": "ng lint app-crm",
2828
"build-ci": "gulp overwrite-package-json && node --max_old_space_size=12192 node_modules/@angular/cli/bin/ng build --configuration production",
29-
"build-ci:app-lob": "gulp overwrite-package-json && node --max_old_space_size=12192 node_modules/@angular/cli/bin/ng build app-lob --configuration production",
29+
"build-ci:app-lob": "gulp overwrite-package-json && node --max_old_space_size=12192 node_modules/@angular/cli/bin/ng build app-lob --configuration production && gulp prerenderPages",
3030
"build-ci:app-crm": "gulp overwrite-package-json && node --max_old_space_size=12192 node_modules/@angular/cli/bin/ng build app-crm --configuration production",
3131
"repositoryfyAngularDemos": "gulp repositoryfyAngularDemos",
3232
"repositoryfyAngularDemos:prod": "gulp repositoryfyAngularDemos --configuration production",
3333
"repositoryfyAngularDemosLob": "gulp repositoryfyAngularDemosLob",
3434
"repositoryfyAngularDemosLob:prod": "gulp repositoryfyAngularDemosLob --configuration production",
3535
"build:stats": "ng build --stats-json",
36-
"analyze": "webpack-bundle-analyzer dist/app/stats.json",
37-
"postbuild:app-lob": "gulp prerenderPages"
36+
"analyze": "webpack-bundle-analyzer dist/app/stats.json"
3837
},
3938
"repository": {
4039
"type": "git",

projects/app-lob/src/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
<meta property="og:description" content="$OG_DESCRIPTION">
1212
<meta property="og:url" content="$OG_URL">
1313
<meta property="og:image" content="https://avatars0.githubusercontent.com/u/5366066?s=400&amp;amp;v=4">
14-
<meta property="og:image:width" content="300" />
15-
<meta property="og:image:height" content="300" />
16-
<meta property="twitter:image" content="https://avatars0.githubusercontent.com/u/5366066?s=400&amp;amp;v=4" />
14+
<meta property="og:image:width" content="300"/>
15+
<meta property="og:image:height" content="300"/>
16+
<meta property="twitter:image" content="https://avatars0.githubusercontent.com/u/5366066?s=400&amp;amp;v=4"/>
1717
<meta property="og:type" content="website">
1818
<meta name="twitter:card" content="summary">
1919
<link rel="icon" type="image/x-icon" href="favicon.ico">

0 commit comments

Comments
 (0)