Skip to content

Commit 3d4daa9

Browse files
Moved Vue to end
1 parent 8458936 commit 3d4daa9

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

ReadMe.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,19 @@ in the my-angular-app directory. When you run ng serve, it will launch the app i
4242
```
4343
yarn run startAngular
4444
```
45+
One thing to notice for the angular-cli are the following two scripts in package.json:
46+
47+
```
48+
"namePkgReturn": "mv package.json replacement.package.json && mv temp.package.json package.json",
49+
"namePkgTemp": "mv package.json temp.package.json && mv replacement.package.json package.json",
50+
51+
```
52+
These are executed by the firstRunAngular script, and these are used to work around the limitation of having the angular-cli library included as a dependency. If you notice the firstRunAngular script, it first renames package.json and uses replacement.package.json which lists the angular-cli library as a peerDependency. After ng new has created the new app, it returns the peerDependencies to regular by renaming temp.package.json to package.json.
53+
54+
firstRunAngular:
55+
```
56+
yarn run namePkgTemp && ng new my-angular-app && yarn run namePkgReturn
57+
```
4558

4659
### preact
4760

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"testReact": "if [ ! -f my-react-app/package.json ]; then yarn run firstRunReact; fi",
2424
"prestartReact": "yarn install && yarn run testReact",
2525
"startReact": "cd my-react-app && yarn start",
26-
"startAll": "parallelshell 'yarn run startReact' 'yarn run startPreact' 'yarn run startVue' 'yarn run startAngular'"
26+
"startAll": "parallelshell 'yarn run startReact' 'yarn run startAngular' 'yarn run startPreact' 'yarn run startVue'"
2727
},
2828
"dependencies": {
2929
"@angular/cli": "^1.4.3",

replacement.package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"testReact": "if [ ! -f my-react-app/package.json ]; then yarn run firstRunReact; fi",
2424
"prestartReact": "yarn install && yarn run testReact",
2525
"startReact": "cd my-react-app && yarn start",
26-
"startAll": "parallelshell 'yarn run startReact' 'yarn run startPreact' 'yarn run startVue' 'yarn run startAngular'"
26+
"startAll": "parallelshell 'yarn run startReact' 'yarn run startAngular' 'yarn run startPreact' 'yarn run startVue'"
2727
},
2828
"peerDependencies": {
2929
"@angular/cli": "^1.4.3",

0 commit comments

Comments
 (0)