chore: make test.sh work again

Previously, `test.sh` relied on calling `build.sh` first
This commit is contained in:
Tobias Bosch 2016-11-23 14:23:05 -08:00
parent 86ffa884b7
commit 6c2d931744
2 changed files with 7 additions and 4 deletions

View File

@ -73,8 +73,7 @@ export class MockTypescriptHost implements ts.LanguageServiceHost {
constructor(private scriptNames: string[], private data: MockData) {
let angularIndex = module.filename.indexOf('@angular');
if (angularIndex >= 0)
this.angularPath =
module.filename.substr(0, angularIndex).replace('/all/', '/packages-dist/');
this.angularPath = module.filename.substr(0, angularIndex).replace('/all/', '/all/@angular/');
let distIndex = module.filename.indexOf('/dist/all');
if (distIndex >= 0)
this.nodeModulesPath = path.join(module.filename.substr(0, distIndex), 'node_modules');

View File

@ -17,8 +17,12 @@ else
else
export NODE_PATH=$NODE_PATH:$(pwd)/dist/all/:$(pwd)/dist/tools/
fi
echo "Compiling tools..."
$(npm bin)/tsc -p tools
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 modules
fi
node dist/tools/tsc-watch/ $1 watch
fi