Skip to content

Commit

Permalink
refactor(tsc-wrapped): move tsc-wrapped to the packages directory (an…
Browse files Browse the repository at this point in the history
  • Loading branch information
chuckjaz authored and mhevery committed Jul 21, 2017
1 parent a6c635e commit 619e625
Show file tree
Hide file tree
Showing 45 changed files with 74 additions and 41 deletions.
3 changes: 1 addition & 2 deletions .pullapprove.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ groups:
- "*.lock"
- "tools/*"
exclude:
- "tools/@angular/tsc-wrapped/*"
- "tools/public_api_guard/*"
- "aio/*"
users:
Expand Down Expand Up @@ -136,7 +135,7 @@ groups:
compiler-cli:
conditions:
files:
- "tools/@angular/tsc-wrapped/*"
- "packages/tsc-wrapped/*"
- "packages/compiler-cli/*"
users:
- alexeagle
Expand Down
17 changes: 12 additions & 5 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ echo "====== BUILDING: Version ${VERSION}"
N="
"
TSC=`pwd`/node_modules/.bin/tsc
NGC="node --max-old-space-size=3000 dist/tools/@angular/tsc-wrapped/src/main"
NGC="node --max-old-space-size=3000 dist/packages-dist/tsc-wrapped/src/main"
MAP_SOURCES="node `pwd`/scripts/build/map_sources.js "
UGLIFYJS=`pwd`/node_modules/.bin/uglifyjs
TSCONFIG=./tools/tsconfig.json
Expand All @@ -345,8 +345,6 @@ if [[ ${BUILD_TOOLS} == true ]]; then
rm -rf ./dist/tools/
mkdir -p ./dist/tools/
$(npm bin)/tsc -p ${TSCONFIG}

cp ./tools/@angular/tsc-wrapped/package.json ./dist/tools/@angular/tsc-wrapped
travisFoldEnd "build tools"
fi

Expand Down Expand Up @@ -398,11 +396,11 @@ if [[ ${BUILD_ALL} == true && ${TYPECHECK_ALL} == true ]]; then

TSCONFIG="packages/tsconfig.json"
travisFoldStart "tsc -p ${TSCONFIG}" "no-xtrace"
$NGC -p ${TSCONFIG}
$TSC -p ${TSCONFIG}
travisFoldEnd "tsc -p ${TSCONFIG}"
TSCONFIG="modules/tsconfig.json"
travisFoldStart "tsc -p ${TSCONFIG}" "no-xtrace"
$NGC -p ${TSCONFIG}
$TSC -p ${TSCONFIG}
travisFoldEnd "tsc -p ${TSCONFIG}"

fi
Expand All @@ -414,6 +412,15 @@ if [[ ${BUILD_ALL} == true ]]; then
fi
fi

if [[ ${BUILD_TOOLS} == true || ${BUILD_ALL} == true ]]; then
echo "====== (tsc-wrapped)COMPILING: \$(npm bin)/tsc -p packages/tsc-wrapped/tsconfig.json ====="
$(npm bin)/tsc -p packages/tsc-wrapped/tsconfig.json
echo "====== (tsc-wrapped)COMPILING: \$(npm bin)/tsc -p packages/tsc-wrapped/tsconfig-build.json ====="
$(npm bin)/tsc -p packages/tsc-wrapped/tsconfig-build.json
cp ./packages/tsc-wrapped/package.json ./dist/packages-dist/tsc-wrapped
cp ./packages/tsc-wrapped/README.md ./dist/packages-dist/tsc-wrapped
fi

for PACKAGE in ${PACKAGES[@]}
do
travisFoldStart "build package: ${PACKAGE}" "no-xtrace"
Expand Down
2 changes: 1 addition & 1 deletion integration/hello_world__closure/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"@angular/core": "file:../../dist/packages-dist/core",
"@angular/platform-browser": "file:../../dist/packages-dist/platform-browser",
"@angular/platform-server": "file:../../dist/packages-dist/platform-server",
"@angular/tsc-wrapped": "file:../../dist/tools/@angular/tsc-wrapped",
"@angular/tsc-wrapped": "file:../../dist/packages-dist/tsc-wrapped",
"google-closure-compiler": "20170409.0.0",
"rxjs": "5.3.1",
"typescript": "2.1.6",
Expand Down
2 changes: 1 addition & 1 deletion integration/language_service_plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"@angular/language-service": "file:../../dist/packages-dist/language-service",
"@angular/platform-browser": "file:../../dist/packages-dist/platform-browser",
"@angular/platform-server": "file:../../dist/packages-dist/platform-server",
"@angular/tsc-wrapped": "file:../../dist/tools/@angular/tsc-wrapped",
"@angular/tsc-wrapped": "file:../../dist/packages-dist/tsc-wrapped",
"@types/minimist": "^1.2.0",
"@types/node": "^7.0.5",
"minimist": "^1.2.0",
Expand Down
2 changes: 1 addition & 1 deletion integration/typings_test_ts21/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@angular/platform-browser-dynamic": "file:../../dist/packages-dist/platform-browser-dynamic",
"@angular/platform-server": "file:../../dist/packages-dist/platform-server",
"@angular/router": "file:../../dist/packages-dist/router",
"@angular/tsc-wrapped": "file:../../dist/tools/@angular/tsc-wrapped",
"@angular/tsc-wrapped": "file:../../dist/packages-dist/tsc-wrapped",
"@angular/upgrade": "file:../../dist/packages-dist/upgrade",
"@types/jasmine": "2.5.41",
"rxjs": "file:../../node_modules/rxjs",
Expand Down
2 changes: 1 addition & 1 deletion integration/typings_test_ts22/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@angular/platform-browser-dynamic": "file:../../dist/packages-dist/platform-browser-dynamic",
"@angular/platform-server": "file:../../dist/packages-dist/platform-server",
"@angular/router": "file:../../dist/packages-dist/router",
"@angular/tsc-wrapped": "file:../../dist/tools/@angular/tsc-wrapped",
"@angular/tsc-wrapped": "file:../../dist/packages-dist/tsc-wrapped",
"@angular/upgrade": "file:../../dist/packages-dist/upgrade",
"@types/jasmine": "2.5.41",
"rxjs": "file:../../node_modules/rxjs",
Expand Down
2 changes: 1 addition & 1 deletion integration/typings_test_ts23/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@angular/platform-browser-dynamic": "file:../../dist/packages-dist/platform-browser-dynamic",
"@angular/platform-server": "file:../../dist/packages-dist/platform-server",
"@angular/router": "file:../../dist/packages-dist/router",
"@angular/tsc-wrapped": "file:../../dist/tools/@angular/tsc-wrapped",
"@angular/tsc-wrapped": "file:../../dist/packages-dist/tsc-wrapped",
"@angular/upgrade": "file:../../dist/packages-dist/upgrade",
"@types/jasmine": "2.5.41",
"rxjs": "file:../../node_modules/rxjs",
Expand Down
1 change: 1 addition & 0 deletions karma-js.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ module.exports = function(config) {
'dist/all/@angular/examples/**/e2e_test/*',
'dist/all/@angular/language-service/**',
'dist/all/@angular/router/test/**',
'dist/all/@angular/tsc-wrapped/**',
'dist/all/@angular/platform-browser/testing/e2e_util.js',
'dist/all/angular1_router.js',
'dist/examples/**/e2e_test/**',
Expand Down
4 changes: 2 additions & 2 deletions modules/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"selenium-webdriver": ["../node_modules/@types/selenium-webdriver/index.d.ts"],
"rxjs/*": ["../node_modules/rxjs/*"],
"@angular/*": ["../dist/all/@angular/*"],
"@angular/tsc-wrapped": ["../dist/tools/@angular/tsc-wrapped"],
"@angular/tsc-wrapped/*": ["../dist/tools/@angular/tsc-wrapped/*"]
"@angular/tsc-wrapped": ["../dist/packages-dist/tsc-wrapped"],
"@angular/tsc-wrapped/*": ["../dist/packages-dist/tsc-wrapped/*"]
},
"rootDir": ".",
"inlineSourceMap": true,
Expand Down
3 changes: 0 additions & 3 deletions packages/compiler-cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,6 @@ At a high level, this program
# Build Angular and the compiler
./build.sh
# Copy over the package so we can test the compiler tests
$ cp tools/@angular/tsc-wrapped/package.json dist/tools/@angular/tsc-wrapped
# Run the test once
# (First edit the LINKABLE_PKGS to use npm link instead of npm install)
$ ./scripts/ci/offline_compiler_test.sh
Expand Down
2 changes: 1 addition & 1 deletion packages/compiler-cli/tsconfig-build.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@angular/http": ["../../dist/packages/http"],
"@angular/platform-server": ["../../dist/packages/platform-server"],
"@angular/platform-browser": ["../../dist/packages/platform-browser"],
"@angular/tsc-wrapped": ["../../dist/tools/@angular/tsc-wrapped"]
"@angular/tsc-wrapped": ["../../dist/packages-dist/tsc-wrapped"]
},
"rootDir": ".",
"sourceMap": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/language-service/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ var tslibLocation = normalize('../../node_modules/tslib');
var esm = 'esm/';

var locations = {
'tsc-wrapped': normalize('../../dist/tools/@angular') + '/',
'tsc-wrapped': normalize('../../dist/packages-dist') + '/',
'compiler-cli': normalize('../../dist/packages') + '/'
};

Expand Down
4 changes: 2 additions & 2 deletions packages/language-service/tsconfig-build.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
"@angular/http": ["../../dist/packages/http"],
"@angular/platform-server": ["../../dist/packages/platform-server"],
"@angular/platform-browser": ["../../dist/packages/platform-browser"],
"@angular/tsc-wrapped": ["../../dist/tools/@angular/tsc-wrapped"],
"@angular/tsc-wrapped/*": ["../../dist/tools/@angular/tsc-wrapped/*"]
"@angular/tsc-wrapped": ["../../dist/packages-dist/tsc-wrapped"],
"@angular/tsc-wrapped/*": ["../../dist/packages-dist/tsc-wrapped/*"]
},
"rootDir": ".",
"sourceMap": true,
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "@angular/tsc-wrapped",
"version": "5.0.0-beta.0",
"version": "0.0.0-PLACEHOLDER",
"description": "Wraps the tsc CLI, allowing extensions.",
"homepage": "https://github.com/angular/angular/blob/master/tools/@angular/tsc-wrapped",
"homepage": "https://github.com/angular/angular/blob/master/packages/tsc-wrapped",
"bugs": "https://github.com/angular/angular/issues",
"contributors": [
"Alex Eagle <[email protected]>",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 6 additions & 0 deletions packages/tsc-wrapped/tsconfig-build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../dist/packages-dist/tsc-wrapped"
}
}
21 changes: 21 additions & 0 deletions packages/tsc-wrapped/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"compilerOptions": {
"baseUrl": ".",
"declaration": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"module": "commonjs",
"moduleResolution": "node",
"outDir": "../../dist/all/@angular/tsc-wrapped",
"noImplicitAny": true,
"noFallthroughCasesInSwitch": true,
"paths": {
},
"rootDir": ".",
"sourceMap": true,
"inlineSources": true,
"lib": ["es6", "dom"],
"target": "es5",
"skipLibCheck": true
}
}
5 changes: 2 additions & 3 deletions packages/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
"selenium-webdriver": ["../node_modules/@types/selenium-webdriver/index.d.ts"],
"rxjs/*": ["../node_modules/rxjs/*"],
"@angular/*": ["./*"],
"@angular/tsc-wrapped": ["../dist/tools/@angular/tsc-wrapped"],
"@angular/tsc-wrapped/*": ["../dist/tools/@angular/tsc-wrapped/*"],
"e2e_util/*": ["../modules/e2e_util/*"]
},
"rootDir": ".",
Expand All @@ -28,6 +26,7 @@
},
"exclude": [
"compiler-cli/integrationtest",
"platform-server/integrationtest"
"platform-server/integrationtest",
"tsc-wrapped"
]
}
19 changes: 11 additions & 8 deletions scripts/ci/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,26 @@ fi

travisFoldStart "tsc tools"
$(npm bin)/tsc -p tools
cp tools/@angular/tsc-wrapped/package.json dist/tools/@angular/tsc-wrapped
$(npm bin)/tsc -p packages/tsc-wrapped/tsconfig-build.json
cp packages/tsc-wrapped/package.json dist/packages-dist/tsc-wrapped
$(npm bin)/tsc -p packages/tsc-wrapped/tsconfig.json
cp packages/tsc-wrapped/package.json dist/all/@angular/tsc-wrapped
travisFoldEnd "tsc tools"


travisFoldStart "tsc all"
node --max-old-space-size=3000 dist/tools/@angular/tsc-wrapped/src/main -p packages
node --max-old-space-size=3000 dist/tools/@angular/tsc-wrapped/src/main -p modules
node --max-old-space-size=3000 dist/packages-dist/tsc-wrapped/src/main -p packages
node --max-old-space-size=3000 dist/packages-dist/tsc-wrapped/src/main -p modules
travisFoldEnd "tsc all"


# TODO(i): what are these compilations here for?
travisFoldStart "tsc a bunch of useless stuff"
node dist/tools/@angular/tsc-wrapped/src/main -p packages/core/tsconfig-build.json
node dist/tools/@angular/tsc-wrapped/src/main -p packages/common/tsconfig-build.json
node dist/tools/@angular/tsc-wrapped/src/main -p packages/platform-browser/tsconfig-build.json
node dist/tools/@angular/tsc-wrapped/src/main -p packages/router/tsconfig-build.json
node dist/tools/@angular/tsc-wrapped/src/main -p packages/forms/tsconfig-build.json
node dist/packages-dist/tsc-wrapped/src/main -p packages/core/tsconfig-build.json
node dist/packages-dist/tsc-wrapped/src/main -p packages/common/tsconfig-build.json
node dist/packages-dist/tsc-wrapped/src/main -p packages/platform-browser/tsconfig-build.json
node dist/packages-dist/tsc-wrapped/src/main -p packages/router/tsconfig-build.json
node dist/packages-dist/tsc-wrapped/src/main -p packages/forms/tsconfig-build.json
travisFoldEnd "tsc a bunch of useless stuff"


Expand Down
3 changes: 1 addition & 2 deletions scripts/ci/offline_compiler_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ set -u -e -o pipefail

# These ones can be `npm link`ed for fast development
LINKABLE_PKGS=(
$(pwd)/dist/packages-dist/{common,forms,core,compiler,compiler-cli,platform-{browser,server},platform-browser-dynamic,router,http,animations}
$(pwd)/dist/tools/@angular/tsc-wrapped
$(pwd)/dist/packages-dist/{common,forms,core,compiler,compiler-cli,platform-{browser,server},platform-browser-dynamic,router,http,animations,tsc-wrapped}
)

[email protected]
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/publish-build-artifacts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ function publishPackages {
PKGS_DIST=$2
BRANCH=$3

for dir in $PKGS_DIST/*/ dist/tools/@angular/tsc-wrapped
for dir in $PKGS_DIST/*/
do
COMPONENT="$(basename ${dir})"

Expand Down
4 changes: 2 additions & 2 deletions scripts/ci/test-js.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ travisFoldEnd "test.unit.node"
# rebuild to revert files in @angular/compiler/test
# TODO(tbosch): remove this and teach karma to serve the right files
travisFoldStart "test.unit.rebuildHack"
node dist/tools/@angular/tsc-wrapped/src/main -p packages/tsconfig.json
node dist/tools/@angular/tsc-wrapped/src/main -p modules/tsconfig.json
node dist/packages-dist/tsc-wrapped/src/main -p packages/tsconfig.json
node dist/packages-dist/tsc-wrapped/src/main -p modules/tsconfig.json
travisFoldStart "test.unit.rebuildHack"


Expand Down
5 changes: 3 additions & 2 deletions test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ else
fi
echo "Compiling tools..."
$(npm bin)/tsc -p tools
$(npm bin)/tsc -p packages/tsc-wrapped
if [[ $1 == 'node' ]]; then
# Note: .metadata.json files are needed for the language service tests!
echo "Creating .metadata.json files..."
node dist/tools/@angular/tsc-wrapped/src/main -p packages
node dist/tools/@angular/tsc-wrapped/src/main -p modules
node dist/all/@angular/tsc-wrapped/src/main -p packages
node dist/all/@angular/tsc-wrapped/src/main -p modules
fi
node dist/tools/tsc-watch/ $1 watch
fi

0 comments on commit 619e625

Please sign in to comment.