File tree Expand file tree Collapse file tree 3 files changed +38
-5
lines changed Expand file tree Collapse file tree 3 files changed +38
-5
lines changed Original file line number Diff line number Diff line change 55.travis.yml 
66coverage 
77demo 
8+ release.sh 
89test 
Original file line number Diff line number Diff line change 77    "node" : " >=0.12" 
88  },
99  "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" 
1410    "test" : " npm run test:babel" 
1511    "test:babel" : " NODE_PATH=$(pwd)/test/tokens/node_modules $npm_package_scripts_test_unit --compilers js:babel-register" 
1612    "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" 
4238    "generic-names" : " ^1.0.1" 
4339    "glob-to-regexp" : " ^0.1.0" 
4440    "icss-replace-symbols" : " ^1.0.2" 
45-     "in-publish" : " ^2.0.0" 
4641    "lodash" : " ^4.3.0" 
4742    "postcss" : " ^5.0.19" 
4843    "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' | cut -d' "' ` 
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