X Tutup
Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion modules/angular2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,12 @@
"rx": "<%= packageJson.dependencies['rx'] %>",
"zone.js": "<%= packageJson.dependencies['zone.js'] %>"
},
"devDependencies": <%= JSON.stringify(packageJson.defaultDevDependencies) %>
"devDependencies": <%= JSON.stringify(packageJson.defaultDevDependencies) %>,
"typescript": {
"definitions": [
"bundles/typings/angular2/angular2.d.ts",
"bundles/typings/angular2/http.d.ts",
"bundles/typings/angular2/router.d.ts"
]
}
}
18 changes: 17 additions & 1 deletion scripts/publish/npm_publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ ROOT_DIR=$(cd $(dirname $0)/../..; pwd)
cd $ROOT_DIR

gulp clean
gulp build.js.prod build.js.dev build.js.cjs benchpress.bundle
# benchpress.bundle and bundles.js will implicitly build everything we need
gulp benchpress.bundle bundles.js docs/typings

NPM_DIR=$ROOT_DIR/dist/npm
rm -fr $NPM_DIR
FILES='!(test|e2e_test|docs)'
DTS_FILES='*.d.ts'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: call this DTS_FILES_GLOB? Or just inline it? It's rather unlikely to change, ever.


Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also remove typings declaration from the browser_tree and node_tree.

function publishRttsAssert {
NAME='rtts_assert'
Expand Down Expand Up @@ -38,6 +40,20 @@ function publishModule {
mkdir -p $PUBLISH_DIR/ts
cp -r $ROOT_DIR/modules/$NAME/$FILES $PUBLISH_DIR/ts

if [ $NAME = "angular2" ]; then
# Publish bundles and typings
mkdir -p $PUBLISH_DIR/bundles/typings/angular2
mkdir -p $PUBLISH_DIR/bundles/typings/es6-promise
mkdir -p $PUBLISH_DIR/bundles/typings/rx
# Copy Bundles
cp -r $ROOT_DIR/dist/js/bundle/$FILES $PUBLISH_DIR/bundles
# Copy Typings
cp -r $ROOT_DIR/dist/docs/typings/angular2/$DTS_FILES $PUBLISH_DIR/bundles/typings/angular2
cp -r $ROOT_DIR/dist/docs/typings/http/$DTS_FILES $PUBLISH_DIR/bundles/typings/angular2
cp -r $ROOT_DIR/modules/angular2/typings/es6-promise/$DTS_FILES $PUBLISH_DIR/bundles/typings/es6-promise
cp -r $ROOT_DIR/modules/angular2/typings/rx/$DTS_FILES $PUBLISH_DIR/bundles/typings/rx
fi

if [ $NAME = "benchpress" ]; then
cp -r $ROOT_DIR/dist/build/benchpress_bundle/$FILES $PUBLISH_DIR
cp -r $ROOT_DIR/dist/js/cjs/benchpress/README.md $PUBLISH_DIR
Expand Down
2 changes: 1 addition & 1 deletion tools/broccoli/trees/browser_tree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ module.exports = function makeBrowserTree(options, destinationPath) {
// Use TypeScript to transpile the *.ts files to ES6
var es6Tree = compileWithTypescript(modulesTree, {
allowNonTsExtensions: false,
declaration: true,
declaration: false,
emitDecoratorMetadata: true,
mapRoot: '', // force sourcemaps to use relative path
noEmitOnError: false,
Expand Down
2 changes: 1 addition & 1 deletion tools/broccoli/trees/node_tree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ module.exports = function makeNodeTree(destinationPath) {
allowNonTsExtensions: false,
emitDecoratorMetadata: true,
experimentalDecorators: true,
declaration: true,
declaration: false,
mapRoot: '', /* force sourcemaps to use relative path */
module: 'commonjs',
noEmitOnError: true,
Expand Down
X Tutup