File tree Expand file tree Collapse file tree 6 files changed +32
-104
lines changed Expand file tree Collapse file tree 6 files changed +32
-104
lines changed Original file line number Diff line number Diff line change 1111 " UTF7"
1212 ],
1313 "scripts" : {
14+ "build" : " ./scripts/build.sh" ,
15+ "release" : " ./scripts/release.sh" ,
1416 "lint" : " $(npm bin)/standard" ,
1517 "test" : " npm run lint && npm run unit" ,
1618 "unit" : " $(npm bin)/mocha './src/*-unit.js' --reporter spec --require babel-register testutils.js" ,
2224 },
2325 "license" : " MIT" ,
2426 "dependencies" : {
25- "base64-js " : " ^1.2.1 "
27+ "emailjs-base64 " : " ^1.0.3 "
2628 },
2729 "devDependencies" : {
30+ "babel-cli" : " ^6.26.0" ,
2831 "babel-preset-es2015" : " ^6.24.1" ,
2932 "babel-register" : " ^6.26.0" ,
3033 "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
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1- import encodeBase64 from './base64-encode'
2- import decodeBase64 from './base64-decode'
1+ import { encode as encodeBase64 , decode as decodeBase64 } from 'emailjs-base64'
32
43function encodeToUTF7 ( str ) {
54 const b = new Uint8Array ( str . length * 2 )
You can’t perform that action at this time.
0 commit comments