feat(publish): update files to publish to npm

This commit is contained in:
Tobias Bosch 2015-02-24 14:52:05 -08:00
parent 3f25f5a356
commit cde8ffd6d9
10 changed files with 97 additions and 63 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -1,23 +1,14 @@
{ {
"name": "angular2", "name": "angular2",
"version": "<%= packageJson.version %>.<%= channel %>", "version": "<%= packageJson.version %>",
"description": "Angular 2 - a web framework for modern web apps", "description": "Angular 2 - a web framework for modern web apps",
"homepage": "<%= packageJson.homepage %>", "homepage": "<%= packageJson.homepage %>",
"bugs": "<%= packageJson.bugs %>", "bugs": "<%= packageJson.bugs %>",
"contributors": <%= JSON.stringify(packageJson.contributors) %>, "contributors": <%= JSON.stringify(packageJson.contributors) %>,
"license": "<%= packageJson.license %>", "license": "<%= packageJson.license %>",
"dependencies": { "dependencies": {
<% if (channel==='dev') { %> "traceur": "<%= packageJson.dependencies.traceur %>",
"rtts_assert": "<%= packageJson.version %>", "rtts_assert": "<%= packageJson.version %>"
<% } %>
"zone.js": "0.4.*"
}, },
"devDependencies": { "devDependencies": <%= JSON.stringify(packageJson.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"
}
} }

View File

@ -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

View File

@ -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

View File

@ -0,0 +1,2 @@
require(require('traceur').RUNTIME_PATH);
module.exports = require('./benchpress.js');

View File

@ -1,21 +1,16 @@
{ {
"name": "angular-benchpress2", "name": "benchpress",
"version": "<%= packageJson.version %>", "version": "<%= packageJson.version %>",
"description": "Angular-Benchpress - a framework for e2e performance tests", "description": "Benchpress - a framework for e2e performance tests",
"homepage": "<%= packageJson.homepage %>", "homepage": "<%= packageJson.homepage %>",
"bugs": "<%= packageJson.bugs %>", "bugs": "<%= packageJson.bugs %>",
"main" : "./index.js",
"contributors": <%= JSON.stringify(packageJson.contributors) %>, "contributors": <%= JSON.stringify(packageJson.contributors) %>,
"license": "<%= packageJson.license %>", "license": "<%= packageJson.license %>",
"dependencies": { "dependencies": {
"traceur": "<%= packageJson.dependencies.traceur %>",
"rtts_assert": "<%= packageJson.version %>", "rtts_assert": "<%= packageJson.version %>",
"angular2": "<%= packageJson.version %>.dev" "selenium-webdriver": "<%= packageJson.dependencies['selenium-webdriver'] %>"
}, },
"devDependencies": { "devDependencies": <%= JSON.stringify(packageJson.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"
}
} }

View File

@ -1,33 +1,48 @@
#!/bin/bash #!/bin/bash
set -ex set -ex
shopt -s extglob
ROOT_DIR=$(cd $(dirname $0)/../..; pwd) ROOT_DIR=$(cd $(dirname $0)/../..; pwd)
cd $ROOT_DIR cd $ROOT_DIR
gulp clean gulp clean
gulp build.js.prod build.js.dev gulp build.js.prod build.js.dev build.js.cjs
function angular { NPM_DIR=$ROOT_DIR/dist/npm
CHANNEL=$1 rm -fr $NPM_DIR
cd $ROOT_DIR/dist/js/$CHANNEL/es6/angular2 FILES='!(test|e2e_test|docs)'
rm -fr test
npm publish ./ --tag "$CHANNEL" 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 { function publishModule {
cd $ROOT_DIR/dist/js/prod/es6/rtts_assert NAME=$1
rm -fr test PUBLISH_DIR=$NPM_DIR/$NAME
npm publish ./ 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 publishRttsAssert
# as implementation is not performance sensitive publishModule angular2
function benchpress { publishModule benchpress
cd $ROOT_DIR/dist/js/dev/es6/benchpress
rm -fr test
npm publish ./
}
rttsAssert
angular dev
angular prod
benchpress