feat(publish): update files to publish to npm
This commit is contained in:
parent
3f25f5a356
commit
cde8ffd6d9
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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) %>
|
||||
}
|
||||
|
|
|
@ -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
|
|
@ -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
|
|
@ -0,0 +1,2 @@
|
|||
require(require('traceur').RUNTIME_PATH);
|
||||
module.exports = require('./benchpress.js');
|
|
@ -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) %>
|
||||
}
|
||||
|
|
|
@ -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
|
||||
publishRttsAssert
|
||||
publishModule angular2
|
||||
publishModule benchpress
|
||||
|
|
Loading…
Reference in New Issue