diff --git a/modules/angular2/README.dart.md b/modules/angular2/README.dart.md new file mode 100644 index 0000000000..35cead7711 --- /dev/null +++ b/modules/angular2/README.dart.md @@ -0,0 +1,6 @@ +Angular2 +========= + +The sources for this package are in the main [Angular2](https://github.com/angular/angular) repo. Please file issues and pull requests against that repo. This is the repository for the upcoming 2.0 version. If you're looking for the current official version of Angular you should go to [angular/angular.js](https://github.com/angular/angular.js) + +License: Apache MIT 2.0 diff --git a/modules/angular2/README.js.md b/modules/angular2/README.js.md new file mode 100644 index 0000000000..61dad2c26c --- /dev/null +++ b/modules/angular2/README.js.md @@ -0,0 +1,18 @@ +Angular2 +========= + +The sources for this package are in the main [Angular2](https://github.com/angular/angular) repo. Please file issues and pull requests against that repo. This is the repository for the upcoming 2.0 version. If you're looking for the current official version of Angular you should go to [angular/angular.js](https://github.com/angular/angular.js) + +This package contains different sources for different users: + +1. The files located in the root folder can be consumed using CommonJS +2. The files under `/es6` are es6 compatible files that can be transpiled to + es5 using any transpiler. This contains: + * `dev/`: a development version that includes runtime type assertions + * `prod/`: a production version that does not include runtime type assertions +3. The files under `/atscript` are the AtScript source files + +As a convenience, we provide you with `/es6/{dev|prod}/es5build.js`, a script to transpile the es6 sources into es5 +using [Google Traceur](https://github.com/google/traceur-compiler/). + +License: Apache MIT 2.0 diff --git a/modules/angular2/README.md b/modules/angular2/README.md deleted file mode 100644 index 495ab16cbe..0000000000 --- a/modules/angular2/README.md +++ /dev/null @@ -1,17 +0,0 @@ -Angular2 -========= - -The sources for this package are in the main [Angular2](https://github.com/angular/angular) repo. Please file issues and pull requests against that repo. This is the repository for the upcoming 2.0 version. If you're looking for the current official version of Angular you should go to [angular/angular.js](https://github.com/angular/angular.js) - -Angular2 has 2 versions: - -1. a development version that includes runtime type assertions: See `ng2dev` npm tag -2. a production version that does not include runtime type assertions: See `ng2prod` npm tag - -All sources are in ES6 format and have the suffix `.es6`. They don't depend on any runtime -and can be used by any modern ES6 -> ES5 transpiler. - -As a convenience, we provide you with `es5build.js`, a script to transpile the sources into es5 -using [Google Traceur](https://github.com/google/traceur-compiler/). - -License: Apache MIT 2.0 diff --git a/modules/angular2/package.json b/modules/angular2/package.json index b1b73e6163..1a00c42b03 100644 --- a/modules/angular2/package.json +++ b/modules/angular2/package.json @@ -1,23 +1,14 @@ { "name": "angular2", - "version": "<%= packageJson.version %>.<%= channel %>", + "version": "<%= packageJson.version %>", "description": "Angular 2 - a web framework for modern web apps", "homepage": "<%= packageJson.homepage %>", "bugs": "<%= packageJson.bugs %>", "contributors": <%= JSON.stringify(packageJson.contributors) %>, "license": "<%= packageJson.license %>", "dependencies": { - <% if (channel==='dev') { %> - "rtts_assert": "<%= packageJson.version %>", - <% } %> - "zone.js": "0.4.*" + "traceur": "<%= packageJson.dependencies.traceur %>", + "rtts_assert": "<%= packageJson.version %>" }, - "devDependencies": { - "yargs": "2.3.*", - "gulp-sourcemaps": "1.3.*", - "gulp-traceur": "0.16.*", - "gulp": "^3.8.8", - "gulp-rename": "^1.2.0", - "through2": "^0.6.1" - } + "devDependencies": <%= JSON.stringify(packageJson.devDependencies) %> } diff --git a/modules/benchpress/README.dart.md b/modules/benchpress/README.dart.md new file mode 100644 index 0000000000..a303a345be --- /dev/null +++ b/modules/benchpress/README.dart.md @@ -0,0 +1,6 @@ +Benchpress - a framework for e2e performance tests +========= + +The sources for this package are in the main [Angular2](https://github.com/angular/angular) repo. Please file issues and pull requests against that repo. + +License: Apache MIT 2.0 diff --git a/modules/benchpress/README.js.md b/modules/benchpress/README.js.md new file mode 100644 index 0000000000..b8ee42e360 --- /dev/null +++ b/modules/benchpress/README.js.md @@ -0,0 +1,18 @@ +Benchpress - a framework for e2e performance tests +========= + +The sources for this package are in the main [Angular2](https://github.com/angular/angular) repo. Please file issues and pull requests against that repo. + +This package contains different sources for different users: + +1. The files located in the root folder can be consumed using CommonJS +2. The files under `/es6` are es6 compatible files that can be transpiled to + es5 using any transpiler. This contains: + * `dev/`: a development version that includes runtime type assertions + * `prod/`: a production version that does not include runtime type assertions +3. The files under `/atscript` are the AtScript source files + +As a convenience, we provide you with `/es6/{dev|prod}/es5build.js`, a script to transpile the es6 sources into es5 +using [Google Traceur](https://github.com/google/traceur-compiler/). + +License: Apache MIT 2.0 diff --git a/modules/benchpress/index.cjs b/modules/benchpress/index.cjs new file mode 100644 index 0000000000..c4dc17cbd6 --- /dev/null +++ b/modules/benchpress/index.cjs @@ -0,0 +1,2 @@ +require(require('traceur').RUNTIME_PATH); +module.exports = require('./benchpress.js'); diff --git a/modules/benchpress/package.json b/modules/benchpress/package.json index c4498d867f..f3ea400d7f 100644 --- a/modules/benchpress/package.json +++ b/modules/benchpress/package.json @@ -1,21 +1,16 @@ { - "name": "angular-benchpress2", + "name": "benchpress", "version": "<%= packageJson.version %>", - "description": "Angular-Benchpress - a framework for e2e performance tests", + "description": "Benchpress - a framework for e2e performance tests", "homepage": "<%= packageJson.homepage %>", "bugs": "<%= packageJson.bugs %>", + "main" : "./index.js", "contributors": <%= JSON.stringify(packageJson.contributors) %>, "license": "<%= packageJson.license %>", "dependencies": { + "traceur": "<%= packageJson.dependencies.traceur %>", "rtts_assert": "<%= packageJson.version %>", - "angular2": "<%= packageJson.version %>.dev" + "selenium-webdriver": "<%= packageJson.dependencies['selenium-webdriver'] %>" }, - "devDependencies": { - "yargs": "2.3.*", - "gulp-sourcemaps": "1.3.*", - "gulp-traceur": "0.16.*", - "gulp": "^3.8.8", - "gulp-rename": "^1.2.0", - "through2": "^0.6.1" - } + "devDependencies": <%= JSON.stringify(packageJson.devDependencies) %> } diff --git a/modules/rtts_assert/README.md b/modules/rtts_assert/README.js.md similarity index 100% rename from modules/rtts_assert/README.md rename to modules/rtts_assert/README.js.md diff --git a/scripts/publish/npm_publish.sh b/scripts/publish/npm_publish.sh index 05c3d4e70e..7082c63ca0 100755 --- a/scripts/publish/npm_publish.sh +++ b/scripts/publish/npm_publish.sh @@ -1,33 +1,48 @@ #!/bin/bash set -ex +shopt -s extglob ROOT_DIR=$(cd $(dirname $0)/../..; pwd) cd $ROOT_DIR + gulp clean -gulp build.js.prod build.js.dev +gulp build.js.prod build.js.dev build.js.cjs -function angular { - CHANNEL=$1 - cd $ROOT_DIR/dist/js/$CHANNEL/es6/angular2 - rm -fr test - npm publish ./ --tag "$CHANNEL" +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 + + cp -r $ROOT_DIR/dist/js/cjs/$NAME/$FILES $PUBLISH_DIR + npm publish $PUBLISH_DIR } -function rttsAssert { - cd $ROOT_DIR/dist/js/prod/es6/rtts_assert - rm -fr test - npm publish ./ +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 } -# only publish dev version of benchpress -# as implementation is not performance sensitive -function benchpress { - cd $ROOT_DIR/dist/js/dev/es6/benchpress - rm -fr test - npm publish ./ -} - -rttsAssert -angular dev -angular prod -benchpress \ No newline at end of file +publishRttsAssert +publishModule angular2 +publishModule benchpress