@@ -10,48 +10,9 @@ gulp clean
1010gulp benchpress.bundle bundles.js
1111
1212NPM_DIR=$ROOT_DIR /dist/npm
13- rm -fr $NPM_DIR
14- FILES=' !(test|e2e_test|docs)'
15- DTS_FILES=' *.d.ts'
1613
17- function publishModule {
18- NAME=$1
19- PUBLISH_DIR=$NPM_DIR /$NAME
20- rm -fr $PUBLISH_DIR
21- mkdir -p $PUBLISH_DIR
14+ scripts/publish/npm_prepare.sh angular2
15+ scripts/publish/npm_prepare.sh benchpress
2216
23- mkdir -p $PUBLISH_DIR /es6/dev
24- cp -r $ROOT_DIR /dist/js/dev/es6/$NAME /$FILES $PUBLISH_DIR /es6/dev
25- mkdir -p $PUBLISH_DIR /es6/prod
26- cp -r $ROOT_DIR /dist/js/prod/es6/$NAME /$FILES $PUBLISH_DIR /es6/prod
27- mkdir -p $PUBLISH_DIR /ts
28- cp -r $ROOT_DIR /modules/$NAME /$FILES $PUBLISH_DIR /ts
29-
30- if [ $NAME = " angular2" ]; then
31- # Publish bundles and typings
32- mkdir -p $PUBLISH_DIR /bundles/typings/es6-shim
33- mkdir -p $PUBLISH_DIR /bundles/typings/jasmine
34- # Copy Bundles
35- cp -r $ROOT_DIR /dist/js/bundle/$FILES $PUBLISH_DIR /bundles
36- # Copy Typings
37- cp -r $ROOT_DIR /modules/angular2/typings/es6-shim/$DTS_FILES $PUBLISH_DIR /bundles/typings/es6-shim
38- cp -r $ROOT_DIR /modules/angular2/typings/jasmine/$DTS_FILES $PUBLISH_DIR /bundles/typings/jasmine
39- fi
40-
41- if [ $NAME = " benchpress" ]; then
42- cp -r $ROOT_DIR /dist/build/benchpress_bundle/$FILES $PUBLISH_DIR
43- cp -r $ROOT_DIR /dist/js/cjs/benchpress/README.md $PUBLISH_DIR
44- cp -r $ROOT_DIR /dist/js/cjs/benchpress/LICENSE $PUBLISH_DIR
45- cp -r $ROOT_DIR /dist/js/cjs/benchpress/docs $PUBLISH_DIR
46- else
47- cp -r $ROOT_DIR /dist/js/cjs/$NAME /$FILES $PUBLISH_DIR
48- fi
49-
50- # Remove all dart related files
51- rm -f $PUBLISH_DIR /{,** /}{* .dart,* .dart.md}
52-
53- npm publish $PUBLISH_DIR
54- }
55-
56- publishModule angular2
57- publishModule benchpress
17+ npm publish $NPM_DIR /angular2
18+ npm publish $NPM_DIR /benchpress
0 commit comments