parent
a5f2e205ef
commit
9decc3d823
|
@ -3,3 +3,6 @@
|
||||||
|
|
||||||
# JS files must always use LF for tools to work
|
# JS files must always use LF for tools to work
|
||||||
*.js eol=lf
|
*.js eol=lf
|
||||||
|
|
||||||
|
# Must keep Windows line ending to be parsed correctly
|
||||||
|
scripts/windows/packages.txt eol=crlf
|
||||||
|
|
8
build.sh
8
build.sh
|
@ -73,12 +73,12 @@ do
|
||||||
|
|
||||||
echo "====== TSC 1.8 d.ts compat for ${DESTDIR} ====="
|
echo "====== TSC 1.8 d.ts compat for ${DESTDIR} ====="
|
||||||
# safely strips 'readonly' specifier from d.ts files to make them compatible with tsc 1.8
|
# safely strips 'readonly' specifier from d.ts files to make them compatible with tsc 1.8
|
||||||
if [[ ${TRAVIS} ]]; then
|
if [ "$(uname)" == "Darwin" ]; then
|
||||||
find ${DESTDIR} -type f -name '*.d.ts' -print0 | xargs -0 sed -i -e 's/\(^ *(static |private )*\)*readonly */\1/g'
|
|
||||||
find ${DESTDIR} -type f -name '*.d.ts' -print0 | xargs -0 sed -i -E 's/^( +)abstract ([[:alnum:]]+\:)/\1\2/g'
|
|
||||||
else
|
|
||||||
find ${DESTDIR} -type f -name '*.d.ts' -print0 | xargs -0 sed -i '' -e 's/\(^ *(static |private )*\)*readonly */\1/g'
|
find ${DESTDIR} -type f -name '*.d.ts' -print0 | xargs -0 sed -i '' -e 's/\(^ *(static |private )*\)*readonly */\1/g'
|
||||||
find ${DESTDIR} -type f -name '*.d.ts' -print0 | xargs -0 sed -i '' -E 's/^( +)abstract ([[:alnum:]]+\:)/\1\2/g'
|
find ${DESTDIR} -type f -name '*.d.ts' -print0 | xargs -0 sed -i '' -E 's/^( +)abstract ([[:alnum:]]+\:)/\1\2/g'
|
||||||
|
else
|
||||||
|
find ${DESTDIR} -type f -name '*.d.ts' -print0 | xargs -0 sed -i -e 's/\(^ *(static |private )*\)*readonly */\1/g'
|
||||||
|
find ${DESTDIR} -type f -name '*.d.ts' -print0 | xargs -0 sed -i -E 's/^( +)abstract ([[:alnum:]]+\:)/\1\2/g'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ${PACKAGE} != compiler-cli ]]; then
|
if [[ ${PACKAGE} != compiler-cli ]]; then
|
||||||
|
|
|
@ -8,6 +8,7 @@ require('./tools/check-environment')(
|
||||||
|
|
||||||
const gulp = require('gulp');
|
const gulp = require('gulp');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
|
const os = require('os');
|
||||||
|
|
||||||
const srcsToFmt = ['tools/**/*.ts', 'modules/@angular/**/*.ts'];
|
const srcsToFmt = ['tools/**/*.ts', 'modules/@angular/**/*.ts'];
|
||||||
|
|
||||||
|
@ -61,7 +62,8 @@ function tsc(projectPath, done) {
|
||||||
|
|
||||||
child_process
|
child_process
|
||||||
.spawn(
|
.spawn(
|
||||||
`${__dirname}/node_modules/.bin/tsc`, ['-p', path.join(__dirname, projectPath)],
|
path.normalize(`${__dirname}/node_modules/.bin/tsc`) + (/^win/.test(os.platform()) ? '.cmd' : ''),
|
||||||
|
['-p', path.join(__dirname, projectPath)],
|
||||||
{stdio: 'inherit'})
|
{stdio: 'inherit'})
|
||||||
.on('close', (errorCode) => done(errorCode));
|
.on('close', (errorCode) => done(errorCode));
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
"url": "https://github.com/angular/angular.git"
|
"url": "https://github.com/angular/angular.git"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"postinstall": "node tools/npm/copy-npm-shrinkwrap; webdriver-manager update"
|
"postinstall": "node tools/npm/copy-npm-shrinkwrap && webdriver-manager update"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"es6-shim": "^0.35.0",
|
"es6-shim": "^0.35.0",
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
cd `dirname $0`
|
||||||
|
|
||||||
|
while read PACKAGE
|
||||||
|
do
|
||||||
|
DESTDIR=./../../modules/\@angular/${PACKAGE}/src
|
||||||
|
mv ${DESTDIR}/facade ${DESTDIR}/facade.old
|
||||||
|
cmd <<< "mklink \"..\\..\\modules\\\@angular\\"${PACKAGE}"\\src\\facade\" \"..\\..\\facade\\src\\\""
|
||||||
|
done < packages.txt
|
|
@ -0,0 +1,9 @@
|
||||||
|
common
|
||||||
|
compiler
|
||||||
|
core
|
||||||
|
forms
|
||||||
|
http
|
||||||
|
platform-browser
|
||||||
|
platform-browser-dynamic
|
||||||
|
platform-server
|
||||||
|
router-deprecated
|
|
@ -0,0 +1,10 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
cd `dirname $0`
|
||||||
|
|
||||||
|
while read PACKAGE
|
||||||
|
do
|
||||||
|
DESTDIR=./../../modules/\@angular/${PACKAGE}/src
|
||||||
|
rm ${DESTDIR}/facade
|
||||||
|
mv ${DESTDIR}/facade.old ${DESTDIR}/facade
|
||||||
|
done < packages.txt
|
|
@ -1,4 +1,6 @@
|
||||||
import {spawn} from 'child_process';
|
import {spawn} from 'child_process';
|
||||||
|
import {platform} from 'os';
|
||||||
|
import {normalize} from 'path';
|
||||||
import {resolve} from 'url';
|
import {resolve} from 'url';
|
||||||
|
|
||||||
enum State {
|
enum State {
|
||||||
|
@ -7,7 +9,7 @@ enum State {
|
||||||
error
|
error
|
||||||
}
|
}
|
||||||
|
|
||||||
export const TSC = 'node_modules/typescript/bin/tsc';
|
export const TSC = normalize('node_modules/.bin/tsc') + (/^win/.test(platform()) ? '.cmd' : '');
|
||||||
export type Command = (stdIn: any, stdErr: any) => Promise<number>;
|
export type Command = (stdIn: any, stdErr: any) => Promise<number>;
|
||||||
|
|
||||||
export class TscWatch {
|
export class TscWatch {
|
||||||
|
|
Loading…
Reference in New Issue