Skip to content

Commit b0bf148

Browse files
author
Dave Syer
committed
Add all of Maven build
1 parent 5248532 commit b0bf148

31 files changed

+9300
-17
lines changed

.angular-cli.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
},
66
"apps": [
77
{
8-
"root": "src",
8+
"root": "client",
99
"outDir": "dist",
1010
"assets": [
1111
"assets",
@@ -36,11 +36,11 @@
3636
},
3737
"lint": [
3838
{
39-
"project": "src/tsconfig.app.json",
39+
"project": "client/tsconfig.app.json",
4040
"exclude": "**/node_modules/**"
4141
},
4242
{
43-
"project": "src/tsconfig.spec.json",
43+
"project": "client/tsconfig.spec.json",
4444
"exclude": "**/node_modules/**"
4545
},
4646
{

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
/out-tsc
77

88
# dependencies
9+
/node
910
/node_modules
1011

1112
# IDEs and editors

.mvn/wrapper/maven-wrapper.jar

46.5 KB
Binary file not shown.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.5.0/apache-maven-3.5.0-bin.zip

README.md

Lines changed: 117 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,130 @@
1-
# Client
1+
```
2+
<build>
3+
<plugins>
4+
<plugin>
5+
<groupId>org.springframework.boot</groupId>
6+
<artifactId>spring-boot-maven-plugin</artifactId>
7+
</plugin>
8+
<plugin>
9+
<groupId>com.github.eirslett</groupId>
10+
<artifactId>frontend-maven-plugin</artifactId>
11+
<version>1.6</version>
12+
<configuration>
13+
<nodeVersion>v8.8.1</nodeVersion>
14+
</configuration>
15+
<executions>
16+
<execution>
17+
<id>install-npm</id>
18+
<goals>
19+
<goal>install-node-and-npm</goal>
20+
</goals>
21+
</execution>
22+
</executions>
23+
</plugin>
24+
<plugin>
25+
<groupId>org.springframework.boot</groupId>
26+
<artifactId>spring-boot-maven-plugin</artifactId>
27+
</plugin>
28+
</plugins>
29+
</build>
30+
```
231

3-
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 1.4.9.
32+
```
33+
$ mvn generate-resources
34+
$ cat > npm
35+
#!/bin/sh
36+
PATH="$PWD/node/":$PATH
37+
node "node/node_modules/npm/bin/npm-cli.js" "$@"
38+
$ chmod +x npm
39+
$ ./npm install @angular/cli
40+
```
441

5-
## Development server
42+
and run `mvn generate-resources` again.
643

7-
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
44+
```
45+
$ cat > ng
46+
#!/bin/sh
47+
PATH="$PWD/node/":$PATH
48+
node_modules/@angular/cli/bin/ng "$@"
49+
$ chmod +x ng
50+
$ ./ng --version
51+
_ _ ____ _ ___
52+
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
53+
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
54+
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
55+
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
56+
|___/
57+
@angular/cli: 1.4.9
58+
node: 8.8.1
59+
os: linux x64
60+
```
861

9-
## Code scaffolding
62+
No create an angular app:
1063

11-
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
64+
```
65+
$ ./ng new client
66+
$ rm -rf client/node*
67+
$ mv client/src tmp
68+
$ mv client/* client/.??* .
69+
$ rm -rf client
70+
$ mv tmp client
71+
$ sed -i -e 's,src,client,' .angular-cli.json
72+
```
1273

13-
## Build
74+
Add
1475

15-
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `-prod` flag for a production build.
76+
```
77+
<execution>
78+
<id>npm-install</id>
79+
<goals>
80+
<goal>npm</goal>
81+
</goals>
82+
<configuration>
83+
<arguments>install</arguments>
84+
</configuration>
85+
</execution>
86+
```
1687

17-
## Running unit tests
88+
Install the modules again using `mvn generate-resources`.
1889

19-
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
90+
```
91+
$ ./ng version
92+
_ _ ____ _ ___
93+
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
94+
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
95+
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
96+
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
97+
|___/
98+
@angular/cli: 1.4.9
99+
node: 8.8.1
100+
os: linux x64
101+
@angular/animations: 4.4.6
102+
@angular/common: 4.4.6
103+
@angular/compiler: 4.4.6
104+
@angular/core: 4.4.6
105+
@angular/forms: 4.4.6
106+
@angular/http: 4.4.6
107+
@angular/platform-browser: 4.4.6
108+
@angular/platform-browser-dynamic: 4.4.6
109+
@angular/router: 4.4.6
110+
@angular/cli: 1.4.9
111+
@angular/compiler-cli: 4.4.6
112+
@angular/language-service: 4.4.6
113+
typescript: 2.3.4
114+
```
20115

21-
## Running end-to-end tests
116+
And the tests work:
22117

23-
Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
118+
```
119+
$ ./ng e2e
120+
...
121+
[13:59:46] I/direct - Using ChromeDriver directly...
122+
Jasmine started
24123
25-
## Further help
124+
client App
125+
✓ should display welcome message
26126
27-
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
127+
Executed 1 of 1 spec SUCCESS in 0.718 sec.
128+
[13:59:48] I/launcher - 0 instance(s) of WebDriver still running
129+
[13:59:48] I/launcher - chrome #01 passed
130+
```

0 commit comments

Comments
 (0)