2015-02-10 18:18:16 -05:00
|
|
|
#!/bin/bash
|
|
|
|
set -ex
|
2015-02-24 17:52:05 -05:00
|
|
|
shopt -s extglob
|
2015-02-10 18:18:16 -05:00
|
|
|
|
|
|
|
ROOT_DIR=$(cd $(dirname $0)/../..; pwd)
|
|
|
|
cd $ROOT_DIR
|
2015-02-24 17:52:05 -05:00
|
|
|
|
2015-02-10 18:18:16 -05:00
|
|
|
gulp clean
|
2015-02-24 17:52:05 -05:00
|
|
|
gulp build.js.prod build.js.dev build.js.cjs
|
2015-02-10 18:18:16 -05:00
|
|
|
|
2015-02-24 17:52:05 -05:00
|
|
|
NPM_DIR=$ROOT_DIR/dist/npm
|
|
|
|
rm -fr $NPM_DIR
|
|
|
|
FILES='!(test|e2e_test|docs)'
|
|
|
|
|
|
|
|
function publishRttsAssert {
|
|
|
|
NAME='rtts_assert'
|
|
|
|
PUBLISH_DIR=$NPM_DIR/$NAME
|
|
|
|
rm -fr $PUBLISH_DIR
|
|
|
|
mkdir -p $PUBLISH_DIR
|
|
|
|
|
|
|
|
mkdir -p $PUBLISH_DIR/es6
|
|
|
|
cp -r $ROOT_DIR/dist/js/prod/es6/$NAME/$FILES $PUBLISH_DIR/es6
|
2015-02-10 18:18:16 -05:00
|
|
|
|
2015-02-24 17:52:05 -05:00
|
|
|
cp -r $ROOT_DIR/dist/js/cjs/$NAME/$FILES $PUBLISH_DIR
|
|
|
|
npm publish $PUBLISH_DIR
|
2015-02-10 18:18:16 -05:00
|
|
|
}
|
|
|
|
|
2015-02-24 17:52:05 -05:00
|
|
|
function publishModule {
|
|
|
|
NAME=$1
|
|
|
|
PUBLISH_DIR=$NPM_DIR/$NAME
|
|
|
|
rm -fr $PUBLISH_DIR
|
|
|
|
mkdir -p $PUBLISH_DIR
|
|
|
|
|
|
|
|
mkdir -p $PUBLISH_DIR/es6/dev
|
|
|
|
cp -r $ROOT_DIR/dist/js/dev/es6/$NAME/$FILES $PUBLISH_DIR/es6/dev
|
|
|
|
mkdir -p $PUBLISH_DIR/es6/prod
|
|
|
|
cp -r $ROOT_DIR/dist/js/prod/es6/$NAME/$FILES $PUBLISH_DIR/es6/prod
|
|
|
|
mkdir -p $PUBLISH_DIR/atscript
|
|
|
|
cp -r $ROOT_DIR/modules/$NAME/$FILES $PUBLISH_DIR/atscript
|
|
|
|
|
|
|
|
cp -r $ROOT_DIR/dist/js/cjs/$NAME/$FILES $PUBLISH_DIR
|
|
|
|
|
|
|
|
npm publish $PUBLISH_DIR
|
2015-02-11 13:13:49 -05:00
|
|
|
}
|
|
|
|
|
2015-02-24 17:52:05 -05:00
|
|
|
publishRttsAssert
|
|
|
|
publishModule angular2
|
|
|
|
publishModule benchpress
|