/** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /* tslint:disable:no-console */ import {existsSync, mkdirSync} from 'fs'; import {TscWatch} from './tsc_watch'; export * from './tsc_watch'; import 'reflect-metadata'; function md(dir: string, folders: string[]) { if (folders.length) { const next = folders.shift(); const path = dir + '/' + next; if (!existsSync(path)) { mkdirSync(path); } md(path, folders); } } let tscWatch: TscWatch = null; const platform = process.argv.length >= 3 ? process.argv[2] : null; const runMode: string = process.argv.length >= 4 ? process.argv[3] : null; const debugMode = process.argv.some(arg => arg === '--debug'); const BaseConfig = { start: 'File change detected. Starting incremental compilation...', // This regex uses a negative lookbehind group (?