Skip to content

Commit 4aff638

Browse files
misc updates
1 parent e2932fd commit 4aff638

File tree

4 files changed

+28
-31
lines changed

4 files changed

+28
-31
lines changed

build/deploy-faas.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#! /bin/sh
2+
mkdir temp_web
3+
npm run deploy:build
4+
cd temp_web
5+
git clone -b gh-pages https://github.com/ElemeFE/element.git && cd element
6+
7+
# build sub folder
8+
SUB_FOLDER='1.4'
9+
mkdir $SUB_FOLDER
10+
11+
rm -rf *.js *.css *.map static
12+
rm -rf $SUB_FOLDER/**
13+
cp -rf ../../examples/element-ui/** .
14+
cp -rf ../../examples/element-ui/** $SUB_FOLDER/
15+
cd ../..
16+
17+
# deploy domestic site
18+
faas deploy alpha

examples/app.vue

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -199,35 +199,6 @@
199199
this.localize();
200200
this.renderAnchorHref();
201201
this.goAnchor();
202-
setTimeout(() => {
203-
const notified = localStorage.getItem('BETA_NOTIFIED');
204-
if (!notified) {
205-
const h = this.$createElement;
206-
const title = this.lang === 'zh-CN'
207-
? '2.0.0 Beta 发布'
208-
: '2.0.0 Beta released';
209-
const messages = this.lang === 'zh-CN'
210-
? ['点击', '这里', '查看详情']
211-
: ['Click ', 'here', ' to learn more'];
212-
this.$notify.success({
213-
title,
214-
duration: 0,
215-
message: h('span', [
216-
messages[0],
217-
h('a', {
218-
attrs: {
219-
target: '_blank',
220-
href: `https://github.com/ElemeFE/element/issues/${ this.lang === 'zh-CN' ? '7612' : '7613' }`
221-
}
222-
}, messages[1]),
223-
messages[2]
224-
]),
225-
onClose() {
226-
localStorage.setItem('BETA_NOTIFIED', 1);
227-
}
228-
});
229-
}
230-
}, 3500);
231202
},
232203
233204
created() {

examples/components/side-nav.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,11 @@
259259
const xhr = new XMLHttpRequest();
260260
xhr.onreadystatechange = _ => {
261261
if (xhr.readyState === 4 && xhr.status === 200) {
262-
this.versions = JSON.parse(xhr.responseText);
262+
const versions = JSON.parse(xhr.responseText);
263+
this.versions = Object.keys(versions).slice(-2).reduce((prev, next) => {
264+
prev[next] = versions[next];
265+
return prev;
266+
}, {});
263267
}
264268
};
265269
xhr.open('GET', '/versions.json');

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,15 @@
2323
"dist:all": "node build/bin/build-all.js && npm run build:theme",
2424
"i18n": "node build/bin/i18n.js",
2525
"lint": "eslint src/**/* test/**/* packages/**/*.{js,vue} build/**/* --quiet",
26-
"pub": "npm run bootstrap && sh build/git-release.sh && sh build/release.sh",
26+
"pub": "npm run bootstrap && sh build/git-release.sh && sh build/release.sh && sh build/deploy-faas.sh",
2727
"pub:all": "npm run dist:all && lerna publish --skip-git && git commit -am 'publish independent packages' && git push eleme dev",
2828
"test": "npm run lint && cross-env CI_ENV=/dev/ karma start test/unit/karma.conf.js --single-run",
2929
"test:watch": "karma start test/unit/karma.conf.js"
3030
},
31+
"faas": {
32+
"domain": "element",
33+
"public": "temp_web/element"
34+
},
3135
"repository": {
3236
"type": "git",
3337
"url": "[email protected]:ElemeFE/element.git"

0 commit comments

Comments
 (0)