-
Notifications
You must be signed in to change notification settings - Fork 5
/
updateAngularProject.sh
43 lines (34 loc) · 1.06 KB
/
updateAngularProject.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/usr/bin/env bash
APP=odata-v4-ng-app
LIBRARY=odata-v4-ng
# create project template
cd ..
rm -Rf temp
mkdir temp
cd temp
ng new $LIBRARY --create-application=false --routing=false --style=less --skip-install
cd $LIBRARY
ng g application $APP --routing --prefix=ov4 --style=less --skip-install
ng g library $LIBRARY --prefix=ov4 --skip-install
# remove git stuff from project template
rm -Rf .git
rm .gitignore
# move outside from project template
cd ..
cd ..
# copy folders from project to project template
cp -Rf $LIBRARY/.git temp/$LIBRARY
cp $LIBRARY/.gitignore temp/$LIBRARY
cp -Rf $LIBRARY/.idea temp/$LIBRARY/
cp $LIBRARY/run-sonar-scanner.sh temp/$LIBRARY
cp $LIBRARY/updateNodeAndAngularCli.sh temp/$LIBRARY
cp $LIBRARY/updateAngularProject.sh temp/$LIBRARY
cp -Rf $LIBRARY/projects/$APP/src/app temp/$LIBRARY/projects/$APP/src
cp -Rf $LIBRARY/projects/$LIBRARY/src temp/$LIBRARY/projects/$LIBRARY
cp -Rf $LIBRARY/docs temp/$LIBRARY/
# remove files from project
rm -Rf $LIBRARY
# copy new template over app
cp -Rfv temp/$LIBRARY ./
# delete template project
rm -Rf temp