File tree Expand file tree Collapse file tree 3 files changed +31
-1
lines changed Expand file tree Collapse file tree 3 files changed +31
-1
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " emailjs-addressparser" ,
3- "version" : " 2.0.0 " ,
3+ "version" : " 2.0.1 " ,
44 "homepage" : " https://github.com/emailjs/emailjs-addressparser" ,
55 "description" : " Parse rfc2822 address fields" ,
66 "author" : " Andris Reinman <andris@kreata.ee>" ,
1313 ],
1414 "license" : " MIT" ,
1515 "scripts" : {
16+ "build" : " ./scripts/build.sh" ,
17+ "release" : " ./scripts/release.sh" ,
1618 "lint" : " $(npm bin)/standard" ,
1719 "test" : " npm run lint && npm run unit" ,
1820 "unit" : " $(npm bin)/mocha './src/*-unit.js' --reporter spec --require babel-register testutils.js" ,
2426 },
2527 "main" : " ./src/addressparser" ,
2628 "devDependencies" : {
29+ "babel-cli" : " ^6.26.0" ,
2730 "babel-preset-es2015" : " ^6.24.1" ,
2831 "babel-register" : " ^6.26.0" ,
2932 "chai" : " ^4.1.2" ,
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ rm -rf $PWD /dist
4+ babel src --out-dir dist --ignore ' **/*-unit.js' --source-maps inline
5+ git reset
6+ git add $PWD /dist
7+ git commit -m ' Updating dist files' -n
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ json_value () {
4+ KEY=$1
5+ num=$2
6+ awk -F" [,:}]" ' {for(i=1;i<=NF;i++){if($i~/' $KEY ' \042/){print $(i+1)}}}' | tr -d ' "' | sed -n ${num} p
7+ }
8+
9+ # read version from package.json and trim leading/trailing whitespace
10+ version=` less package.json | json_value version 1 | sed -e ' s/^ *//' -e ' s/ *$//' `
11+ prefix=" v"
12+ # tag, push, publish
13+ echo -e " \n> tagging $prefix$version "
14+ git tag " $prefix$version "
15+ echo -e " \n> pushing commits to origin"
16+ git push
17+ echo -e " \n> pushing tags to origin"
18+ git push --tags
19+ echo -e " \n> publishing on npm"
20+ npm publish
You can’t perform that action at this time.
0 commit comments