From ca16fc29a640bd0201a5045ff128d3813088bdc0 Mon Sep 17 00:00:00 2001 From: mlaval Date: Thu, 21 Jul 2016 18:01:47 +0200 Subject: [PATCH] build: fix and document the symlinks scripts for Windows Closes #10213 --- DEVELOPER.md | 12 ++++++++++++ scripts/windows/create-symlinks.sh | 3 ++- scripts/windows/remove-symlinks.sh | 3 ++- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/DEVELOPER.md b/DEVELOPER.md index 3159aa5a40..9b1633c8b4 100644 --- a/DEVELOPER.md +++ b/DEVELOPER.md @@ -74,6 +74,18 @@ use in these instructions. *Option 2*: defining a bash alias like `alias nbin='PATH=$(npm bin):$PATH'` as detailed in this [Stackoverflow answer](http://stackoverflow.com/questions/9679932/how-to-use-package-installed-locally-in-node-modules/15157360#15157360) and used like this: e.g., `nbin gulp build`. +## Windows only + +In order to create the right symlinks, run **as administrator**: +```shell +./scripts/windows/create-symlinks.sh +``` + +Before submitting a PR, do not forget to remove them: +```shell + ./scripts/windows/remove-symlinks.sh + ``` + ## Building To build Angular run: diff --git a/scripts/windows/create-symlinks.sh b/scripts/windows/create-symlinks.sh index 36658ff349..16905cef13 100644 --- a/scripts/windows/create-symlinks.sh +++ b/scripts/windows/create-symlinks.sh @@ -2,8 +2,9 @@ cd `dirname $0` -while read PACKAGE +while read RAW_PACKAGE do + PACKAGE=${RAW_PACKAGE: : -1} DESTDIR=./../../modules/\@angular/${PACKAGE}/src mv ${DESTDIR}/facade ${DESTDIR}/facade.old cmd <<< "mklink \"..\\..\\modules\\\@angular\\"${PACKAGE}"\\src\\facade\" \"..\\..\\facade\\src\\\"" diff --git a/scripts/windows/remove-symlinks.sh b/scripts/windows/remove-symlinks.sh index 0b6f261316..c7a714f1c8 100644 --- a/scripts/windows/remove-symlinks.sh +++ b/scripts/windows/remove-symlinks.sh @@ -2,8 +2,9 @@ cd `dirname $0` -while read PACKAGE +while read RAW_PACKAGE do + PACKAGE=${RAW_PACKAGE: : -1} DESTDIR=./../../modules/\@angular/${PACKAGE}/src rm ${DESTDIR}/facade mv ${DESTDIR}/facade.old ${DESTDIR}/facade