diff --git a/README.md b/README.md index a5df0a7411ae..6827beeb2083 100644 --- a/README.md +++ b/README.md @@ -240,7 +240,7 @@ The installation of 3rd party libraries are well described at our [Wiki Page](ht This project is currently a prototype so there are many known issues. Just to mention a few: - All blueprints/scaffolds are in TypeScript only, in the future blueprints in all dialects officially supported by Angular will be available. -- On Windows you need to run the `build` and `serve` commands with Admin permissions. +- On Windows you need to run the `build` and `serve` commands with Admin permissions, otherwise the performance is not good. - The initial installation as well as `ng new` take too long because of lots of npm dependencies. - Many existing ember addons are not compatible with Angular apps built via angular-cli. - When you `ng serve` remember that the generated project has dependencies that require **Node 4 or greater**. diff --git a/lib/broccoli/broccoli-typescript.js b/lib/broccoli/broccoli-typescript.js index 87d395fb918a..8ab914c3ef0f 100644 --- a/lib/broccoli/broccoli-typescript.js +++ b/lib/broccoli/broccoli-typescript.js @@ -78,7 +78,12 @@ class BroccoliTypeScriptCompiler extends Plugin { this._fileRegistry[tsFilePath].outputs.forEach(absoluteFilePath => { const outputFilePath = absoluteFilePath.replace(this.cachePath, this.outputPath); fse.mkdirsSync(path.dirname(outputFilePath)); - fs.symlinkSync(absoluteFilePath, outputFilePath); + try { + fs.symlinkSync(absoluteFilePath, outputFilePath); + } catch (e) { + const conentStr = fs.readFileSync(absoluteFilePath); + fs.writeFileSync(outputFilePath, conentStr); + } }); } else { this._fileRegistry[tsFilePath].version = entry.mtime; @@ -203,7 +208,12 @@ class BroccoliTypeScriptCompiler extends Plugin { fs.writeFileSync(absoluteFilePath, content, FS_OPTS); fse.mkdirsSync(path.dirname(outputFilePath)); - fs.symlinkSync(absoluteFilePath, outputFilePath); + try { + fs.symlinkSync(absoluteFilePath, outputFilePath); + } catch (e) { + const conentStr = fs.readFileSync(absoluteFilePath); + fs.writeFileSync(outputFilePath, conentStr); + } } _addNewFileEntry(entry, checkDuplicates /* = true */) {