Skip to content
This repository was archived by the owner on Feb 5, 2022. It is now read-only.

Commit 9a88867

Browse files
authored
Merge pull request #390 from openforge/ys-upgrade-stencil
Upgrade stencil to the latest version (1.7.1)
2 parents 0261399 + cbab660 commit 9a88867

File tree

43 files changed

+1239
-2338
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+1239
-2338
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,5 @@ UserInterfaceState.xcuserstate
2525
.env
2626
linters/sass-lint.html
2727
src/pages/app-blog-post/prerender-blog-data.ts
28-
src/butter-api/butter-api-key.js
28+
src/butter-api/butter-api-key.js
29+
src/components.d.ts

package-lock.json

Lines changed: 763 additions & 1092 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -27,46 +27,46 @@
2727
"firebase:deploy:prod": "firebase use production && firebase deploy --token \"$FIREBASE_TOKEN\""
2828
},
2929
"dependencies": {
30-
"@stencil/sass": "0.0.3",
31-
"@types/i18next": "^8.4.3",
32-
"@types/jquery": "^3.3.29",
33-
"buttercms": "^1.1.4",
34-
"i18next": "^11.3.2",
35-
"jquery": "^3.3.1",
36-
"popper.js": "^1.14.7",
30+
"@stencil/sass": "^1.1.0",
31+
"@types/jquery": "^3.3.31",
32+
"i18next": "^17.3.0",
33+
"jquery": "^3.4.1",
34+
"popper.js": "^1.16.0",
3735
"sticky-sidebar": "^3.3.1"
3836
},
3937
"devDependencies": {
4038
"@commitlint/cli": "^6.1.3",
4139
"@commitlint/config-conventional": "^6.1.3",
42-
"@stencil/core": "^0.18.0",
40+
"@stencil/core": "^1.7.4",
4341
"@stencil/dev-server": "0.0.19-0",
44-
"@stencil/router": "0.2.5",
45-
"@stencil/state-tunnel": "0.0.6",
42+
"@stencil/router": "^1.0.1",
43+
"@stencil/state-tunnel": "^1.0.1",
4644
"@stencil/utils": "latest",
47-
"@types/mocha": "^5.2.0",
48-
"@types/smoothscroll-polyfill": "^0.3.0",
49-
"bootstrap": "^4.2.1",
45+
"@types/mocha": "^5.2.7",
46+
"@types/node": "^12.11.5",
47+
"@types/smoothscroll-polyfill": "^0.3.1",
48+
"bootstrap": "^4.3.1",
49+
"chokidar": "^3.2.2",
5050
"commitizen": "^2.9.6",
5151
"conventional-changelog-cli": "^1.3.22",
5252
"cypress": "^2.1.0",
5353
"cz-conventional-changelog": "^2.1.0",
5454
"husky": "^0.15.0-rc.13",
5555
"jest": "^21.2.1",
5656
"lint-staged": "^7.0.4",
57-
"prettier": "^1.12.1",
57+
"prettier": "^1.18.2",
5858
"rollup-plugin-node-builtins": "^2.1.2",
5959
"rollup-plugin-node-globals": "^1.4.0",
60-
"rxjs-compat": "^6.1.0",
61-
"sass-lint": "^1.12.1",
62-
"smoothscroll-polyfill": "^0.4.3",
60+
"rxjs-compat": "^6.5.3",
61+
"sass-lint": "^1.13.1",
62+
"smoothscroll-polyfill": "^0.4.4",
6363
"sync-request": "^6.0.0",
64-
"tslint": "^5.9.1",
65-
"tslint-config-airbnb": "^5.8.0",
66-
"tslint-config-prettier": "^1.12.0",
64+
"tslint": "^5.20.0",
65+
"tslint-config-airbnb": "^5.11.2",
66+
"tslint-config-prettier": "^1.18.0",
6767
"tslint-react": "^3.5.1",
6868
"typescript": "^2.8.3",
69-
"workbox-build": "3.4.1",
69+
"workbox-build": "4.3.1",
7070
"xvfb": "^0.2.3"
7171
},
7272
"repository": {
@@ -116,5 +116,8 @@
116116
"prettier --write",
117117
"git add"
118118
]
119+
},
120+
"engines": {
121+
"node": "10"
119122
}
120123
}

scripts/assets-rename.js

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
var fs = require('fs');
2+
3+
function getHashCode() {
4+
return '_' + (+new Date).toString(36);
5+
}
6+
7+
// Get all assets
8+
var allAssets = fs.readdirSync('src/assets/icon');
9+
// For each asset
10+
allAssets.forEach(function (assetFile) {
11+
var hashCode = getHashCode();
12+
// Rename the file
13+
fs.renameSync('src/assets/icon/' + assetFile, 'src/assets/icon/' + assetFile + hashCode);
14+
15+
// Get all src files from pages
16+
var allSrcFiles = fs.readdirSync('src/pages');
17+
// For each src file
18+
allSrcFiles.forEach(function (srcFile) {
19+
// Replace the old name for the new name
20+
var data = fs.readFileSync('src/pages' + srcFile, 'utf-8');
21+
var newValue = data.replace('src/assets/icon/' + assetFile, 'src/assets/icon/' + assetFile + hashCode);
22+
fs.writeFileSync('src/pages' + srcFile, newValue, 'utf-8');
23+
});
24+
25+
// Get all src files from components
26+
var allSrcFiles = fs.readdirSync('src/components');
27+
// For each src file
28+
allSrcFiles.forEach(function (srcFile) {
29+
// Replace the old name for the new name
30+
var data = fs.readFileSync('src/components' + srcFile, 'utf-8');
31+
var newValue = data.replace('src/assets/icon/' + assetFile, 'src/assets/icon/' + assetFile + hashCode);
32+
fs.writeFileSync('src/components' + srcFile, newValue, 'utf-8');
33+
});
34+
});

0 commit comments

Comments
 (0)