File tree 3 files changed +38
-5
lines changed
3 files changed +38
-5
lines changed Original file line number Diff line number Diff line change 5
5
.travis.yml
6
6
coverage
7
7
demo
8
+ release.sh
8
9
test
Original file line number Diff line number Diff line change 7
7
"node" : " >=0.12"
8
8
},
9
9
"scripts" : {
10
- "build" : " babel lib --out-dir lib && babel preset.js --out-file preset.js" ,
11
- "cleanup" : " git reset --hard" ,
12
- "prepublish" : " in-publish && npm run -s build || in-install" ,
13
- "publish" : " in-publish && npm run -s cleanup || in-install" ,
14
10
"test" : " npm run test:babel" ,
15
11
"test:babel" : " NODE_PATH=$(pwd)/test/tokens/node_modules $npm_package_scripts_test_unit --compilers js:babel-register" ,
16
12
"test:coverage" : " NODE_PATH=$(pwd)/test/tokens/node_modules babel-node --presets es2015 `npm bin`/isparta cover --report text --report html `npm bin`/_mocha -- --require test/setup.js --ui tdd test/*/*.js" ,
42
38
"generic-names" : " ^1.0.1" ,
43
39
"glob-to-regexp" : " ^0.1.0" ,
44
40
"icss-replace-symbols" : " ^1.0.2" ,
45
- "in-publish" : " ^2.0.0" ,
46
41
"lodash" : " ^4.3.0" ,
47
42
"postcss" : " ^5.0.19" ,
48
43
"postcss-modules-extract-imports" : " ^1.0.0" ,
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ if [ ` git status -s| wc -l` -gt ' 0' ]; then
4
+ echo ' commit changes first'
5
+ exit 1
6
+ fi
7
+
8
+ case " $1 " in
9
+ major|x..)
10
+ versionType=major;;
11
+
12
+ minor|.x.)
13
+ versionType=minor;;
14
+
15
+ patch|..x)
16
+ versionType=patch;;
17
+
18
+ * )
19
+ echo ' choose the version to deploy'
20
+ echo ' deploy major|minor|patch|x..|.x.|..x'
21
+ exit ;;
22
+ esac
23
+
24
+ # test the code
25
+ npm run test:node || exit 1
26
+ # update package version
27
+ npm --no-git-tag-version version " $versionType "
28
+ git add package.json
29
+ version=` sed -n ' /version/p' package.json| cut -d' "' -f4`
30
+ git commit -m " version $version "
31
+ git tag " $version "
32
+
33
+ cli=node_modules/.bin
34
+ ${cli} /babel lib --out-dir lib || exit 1
35
+ ${cli} /babel preset.js --out-file preset.js || exit 1
36
+ npm publish
37
+ git reset HEAD --hard
You can’t perform that action at this time.
0 commit comments