X Tutup
Skip to content

Commit 4b9fe01

Browse files
committed
WIP: package.json for each package
1 parent a4646db commit 4b9fe01

File tree

10 files changed

+119
-12
lines changed

10 files changed

+119
-12
lines changed

build-igorminar.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env bash
2+
3+
cd `dirname $0`
4+
./build.sh
5+
echo "====== RENAMING @angular to @igorminar ======"
6+
find ./dist/packages-dist/ -type f -print0 | xargs -0 sed -i '' 's/\@angular/\@igorminar/g'

build.sh

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,24 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
cd `dirname $0`
44

5-
for package in \
5+
for PACKAGE in \
66
core \
77
compiler \
88
common \
99
http \
1010
platform-browser \
1111
platform-server
1212
do
13-
TSCONFIG=./modules/angular2/${package}/tsconfig.json
14-
echo "====== COMPILING: ${TSCONFIG} ====="
15-
rm -rf ./dist/packages-dist/${package}
16-
$(npm bin)/tsc -p ${TSCONFIG}
17-
TSCONFIG=./modules/angular2/${package}/tsconfig-es2015.json
18-
echo "====== COMPILING: ${TSCONFIG} ====="
19-
$(npm bin)/tsc -p ${TSCONFIG}
13+
SRCDIR=./modules/angular2/${PACKAGE}
14+
DESTDIR=./dist/packages-dist/${PACKAGE}
15+
echo "====== COMPILING: ${SRCDIR}/tsconfig.json ====="
16+
rm -rf ${DESTDIR}
17+
$(npm bin)/tsc -p ${SRCDIR}/tsconfig.json
18+
cp ${SRCDIR}/package.json ${DESTDIR}/
19+
20+
echo "====== COMPILING: ${SRCDIR}/tsconfig-es2015.json ====="
21+
$(npm bin)/tsc -p ${SRCDIR}/tsconfig-es2015.json
2022
done
2123

2224
TSCONFIG=./modules/angular2/tsconfig.json
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"name": "@angular/common",
3+
"version": "0.0.0",
4+
"description": "",
5+
"main": "common.js",
6+
"jsnext:main": "esm/common.js",
7+
"author": "angular",
8+
"license": "MIT",
9+
10+
"peerDependencies": {
11+
"@angular/core": "*"
12+
}
13+
}

modules/angular2/common/tsconfig.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"declaration": true,
55
"emitDecoratorMetadata": true,
66
"experimentalDecorators": true,
7-
"module": "es2015",
7+
"module": "commonjs",
88
"moduleResolution": "node",
99
"outDir": "../../../dist/packages-dist/common/",
1010
"paths": {
@@ -13,10 +13,13 @@
1313
"rootDir": ".",
1414
"sourceMap": true,
1515
"sourceRoot": ".",
16-
"target": "es2015"
16+
"target": "es5"
1717
},
1818
"files": [
1919
"common.ts",
20+
"../typings/es6-collections/es6-collections.d.ts",
21+
"../typings/es6-promise/es6-promise.d.ts",
22+
"../manual_typings/globals.d.ts",
2023
"../../../node_modules/zone.js/dist/zone.js.d.ts"
2124

2225
]
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"name": "@angular/compiler",
3+
"version": "0.0.0",
4+
"description": "",
5+
"main": "compiler.js",
6+
"jsnext:main": "esm/compiler.js",
7+
"author": "angular",
8+
"license": "MIT",
9+
10+
"peerDependencies": {
11+
"@angular/core": "*"
12+
}
13+
}

modules/angular2/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "@igorminar/core",
2+
"name": "@angular/core",
33
"version": "0.0.0",
44
"description": "",
55
"main": "core.js",

modules/angular2/http/package.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "@angular/http",
3+
"version": "0.0.0",
4+
"description": "",
5+
"main": "http.js",
6+
"jsnext:main": "esm/http.js",
7+
"author": "angular",
8+
"license": "MIT",
9+
10+
"dependencies": {
11+
"reflect-metadata": "^0.1.2",
12+
"rxjs": "5.0.0-beta.2",
13+
"zone.js": "^0.6.6",
14+
"@angular/core": "*",
15+
"@angular/common": "*",
16+
"@angular/compiler": "*"
17+
}
18+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "@angular/platform-browser",
3+
"version": "0.0.0",
4+
"description": "",
5+
"main": "platform_browser.js",
6+
"jsnext:main": "esm/platform_browser.js",
7+
"author": "angular",
8+
"license": "MIT",
9+
10+
"dependencies": {
11+
"reflect-metadata": "^0.1.2",
12+
"rxjs": "5.0.0-beta.2",
13+
"zone.js": "^0.6.6",
14+
"@angular/core": "*",
15+
"@angular/common": "*",
16+
"@angular/compiler": "*"
17+
}
18+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "@angular/platform-server",
3+
"version": "0.0.0",
4+
"description": "",
5+
"main": "platform_server.js",
6+
"jsnext:main": "esm/platform_server.js",
7+
"author": "angular",
8+
"license": "MIT",
9+
10+
"dependencies": {
11+
"reflect-metadata": "^0.1.2",
12+
"rxjs": "5.0.0-beta.2",
13+
"zone.js": "^0.6.6",
14+
"@angular/core": "*",
15+
"@angular/common": "*",
16+
"@angular/compiler": "*"
17+
}
18+
}

publish-igorminar.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/usr/bin/env bash
2+
3+
cd `dirname $0 `
4+
5+
for PACKAGE in \
6+
core \
7+
compiler \
8+
common \
9+
http \
10+
platform-browser \
11+
platform-server
12+
do
13+
DESTDIR=./dist/packages-dist/${PACKAGE}
14+
echo "====== PUBLISHING: ${DESTDIR} ====="
15+
npm publish ${DESTDIR} --access public
16+
done

0 commit comments

Comments
 (0)
X Tutup