refactor(tsc-wrapped): move tsc-wrapped to the packages directory (#18160)

This commit is contained in:
Chuck Jazdzewski 2017-07-16 10:47:46 -07:00 committed by Miško Hevery
parent a6c635e69e
commit 619e625ee2
45 changed files with 74 additions and 41 deletions

View File

@ -69,7 +69,6 @@ groups:
- "*.lock"
- "tools/*"
exclude:
- "tools/@angular/tsc-wrapped/*"
- "tools/public_api_guard/*"
- "aio/*"
users:
@ -136,7 +135,7 @@ groups:
compiler-cli:
conditions:
files:
- "tools/@angular/tsc-wrapped/*"
- "packages/tsc-wrapped/*"
- "packages/compiler-cli/*"
users:
- alexeagle

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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/**',

View File

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

View File

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

View File

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

View File

@ -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') + '/'
};

View File

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

View File

@ -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 <alexeagle@google.com>",

View File

@ -0,0 +1,6 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../dist/packages-dist/tsc-wrapped"
}
}

View File

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

View File

@ -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": ".",
@ -28,6 +26,7 @@
},
"exclude": [
"compiler-cli/integrationtest",
"platform-server/integrationtest"
"platform-server/integrationtest",
"tsc-wrapped"
]
}

View File

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

View File

@ -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}
)
TYPESCRIPT_2_1=typescript@2.1.5

View File

@ -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})"

View File

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

View File

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