feat(repo): add update-playground script (#2433)

After creating a new playground, you can now run `yarn update-playground` to update with the latest
changes to NX without deleting and recreating the whole playground
This commit is contained in:
Rares Matei 2020-02-05 15:25:40 +00:00 committed by GitHub
parent c27b33a6ec
commit 305cd42002
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 0 deletions

View File

@ -12,6 +12,7 @@
"e2e": "./scripts/e2e.sh", "e2e": "./scripts/e2e.sh",
"e2e-rerun": "./scripts/e2e-rerun.sh", "e2e-rerun": "./scripts/e2e-rerun.sh",
"create-playground": "./scripts/e2e.sh create-playground", "create-playground": "./scripts/e2e.sh create-playground",
"update-playground": "./scripts/update-playground.sh",
"e2e-ci1": "./scripts/e2e-ci1.sh", "e2e-ci1": "./scripts/e2e-ci1.sh",
"e2e-ci2": "./scripts/e2e-ci2.sh", "e2e-ci2": "./scripts/e2e-ci2.sh",
"format": "./scripts/format.sh", "format": "./scripts/format.sh",

13
scripts/update-playground.sh Executable file
View File

@ -0,0 +1,13 @@
#!/usr/bin/env bash
./scripts/build.sh
echo 'Updating all playground projects...'
# Update NX playground
rm -rf tmp/nx/proj/node_modules/@nrwl
cp -r build/packages tmp/nx/proj/node_modules/@nrwl
# Update Angular playground
rm -rf tmp/angular/proj/node_modules/@nrwl
cp -r build/packages tmp/angular/proj/node_modules/@nrwl