Skip to content

Commit fb966de

Browse files
authored
Merge pull request #34 from FEMessage/dev
2 parents e1a08d2 + 4f2719a commit fb966de

File tree

11 files changed

+12419
-101
lines changed

11 files changed

+12419
-101
lines changed

.travis.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ node_js:
66
- lts/*
77
git:
88
depth: 3
9+
install:
10+
- yarn --frozen-lockfile
11+
script:
12+
- ./build.sh
13+
after_success:
14+
- GREN_GITHUB_TOKEN=$GITHUB_TOKEN yarn release
15+
cache: yarn
916
deploy:
1017
on:
1118
branch: master

build.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/sh
2+
yarn stdver
3+
4+
yarn test
5+
6+
git remote add github https://$GITHUB_TOKEN@github.com/FEMessage/vue-sfc-cli.git > /dev/null 2>&1
7+
git push github HEAD:master --follow-tags
8+

init.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ const FileActions = require('./lib/fileActions')
55
const kleur = require('kleur')
66
const path = require('path')
77
const readline = require('readline-sync')
8+
const fs = require('fs')
89

910
const argv = process.argv.slice(2)
1011

@@ -36,4 +37,6 @@ fileActions.move({
3637
}
3738
})
3839

40+
fs.chmodSync(path.join(outDir, 'build.sh'), '755')
41+
3942
logger.success(`Generated into ${kleur.underline(outDir)}`)

package.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@
2222
],
2323
"scripts": {
2424
"test": "echo \"Info: no test specified\"",
25-
"preview": "node init --test && cd v-test && yarn --registry=https://registry.npm.taobao.org && yarn doc"
25+
"preview": "node init --test && cd v-test && yarn --registry=https://registry.npm.taobao.org && yarn doc",
26+
"stdver": "standard-version -m '[skip ci] chore(release): v%s'",
27+
"release": "gren release --override"
2628
},
2729
"dependencies": {
2830
"fs-extra": "^7.0.1",
@@ -32,5 +34,9 @@
3234
},
3335
"engines": {
3436
"npm": ">=5.2.0"
37+
},
38+
"devDependencies": {
39+
"github-release-notes": "^0.17.0",
40+
"standard-version": "^6.0.1"
3541
}
3642
}

templates/.babelrc

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,6 @@
22
"presets": [
33
["@babel/env", { "modules": false }]
44
],
5-
"env": {
6-
"test": {
7-
"presets": [
8-
["@babel/env", { "targets": { "node": "current" }}]
9-
]
10-
}
11-
},
125
"plugins": [
136
["@babel/transform-runtime", {
147
"regenerator": true

templates/.travis.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ git:
99
install:
1010
- yarn --frozen-lockfile
1111
script:
12-
- yarn build
12+
- ./build.sh
13+
after_success:
14+
- GREN_GITHUB_TOKEN=$GITHUB_TOKEN yarn release
1315
cache: yarn
1416
deploy:
1517
- provider: pages

templates/build.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/sh
2+
yarn stdver
3+
4+
yarn build
5+
6+
git remote add github https://$GITHUB_TOKEN@github.com/FEMessage/{{componentName}}.git > /dev/null 2>&1
7+
git push github HEAD:master --follow-tags
8+

templates/package-json

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
"scripts": {
2222
"dev": "vue-styleguidist server",
2323
"doc": "vue-styleguidist build",
24-
"test": "jest",
2524
"build":
2625
"npm run build:unpkg & npm run build:es & npm run build:umd & npm run doc",
2726
"build:umd":
@@ -30,7 +29,9 @@
3029
"rollup --config build/rollup.config.js --format es --file dist/{{componentName}}.esm.js",
3130
"build:unpkg":
3231
"rollup --config build/rollup.config.js --format iife --file dist/{{componentName}}.min.js",
33-
"precommit": "pretty-quick --staged"
32+
"precommit": "pretty-quick --staged",
33+
"stdver": "standard-version -m '[skip ci] chore(release): v%s'",
34+
"release": "gren release --override"
3435
},
3536

3637
"dependencies": {},
@@ -39,12 +40,10 @@
3940
"@babel/core": "^7.4.3",
4041
"@babel/plugin-transform-runtime": "^7.4.3",
4142
"@babel/preset-env": "^7.4.3",
42-
"@vue/test-utils": "^1.0.0-beta.16",
43-
"babel-jest": "^24.7.1",
4443
"babel-loader": "^8.0.5",
44+
"github-release-notes": "^0.17.0",
4545
"glob": "^7.1.3",
4646
"husky": "^0.14.3",
47-
"jest": "^23.1.0",
4847
"minimist": "^1.2.0",
4948
"prettier": "1.12.1",
5049
"pretty-quick": "^1.4.1",
@@ -53,10 +52,10 @@
5352
"rollup-plugin-commonjs": "^9.3.4",
5453
"rollup-plugin-terser": "^4.0.4",
5554
"rollup-plugin-vue": "^4.7.2",
55+
"standard-version": "^6.0.1",
5656
"stylus": "^0.54.5",
5757
"stylus-loader": "^3.0.2",
5858
"vue": "^2.5.16",
59-
"vue-jest": "^3.0.4",
6059
"vue-loader": "^15.7.0",
6160
"vue-styleguidist": "3.11.4",
6261
"vue-template-compiler": "^2.5.16",
@@ -67,14 +66,6 @@
6766
"access": "public"
6867
},
6968

70-
"jest": {
71-
"moduleFileExtensions": ["js", "vue"],
72-
"transform": {
73-
"^.+\\.js$": "./node_modules/babel-jest",
74-
"^.+\\.vue$": "./node_modules/vue-jest"
75-
}
76-
},
77-
7869
"vue-sfc-cli": "{{cliVersion}}",
7970

8071
"engines": {

templates/test/index.test.js

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)