Skip to content

Commit 93ff249

Browse files
author
Rachit Bhasin
committed
Added yarn to frontend build process
1 parent ae19277 commit 93ff249

File tree

5 files changed

+6684
-46
lines changed

5 files changed

+6684
-46
lines changed

.gitignore

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ src/main/webapp/react-app/coverage*
3737
src/main/webapp/react-app/npm-debug.log
3838

3939
// Javascript bundle
40-
src/main/webapp/js*
40+
src/main/webapp/static/js/*
4141

4242
// CSS bundle
43-
src/main/webapp/css*
43+
src/main/webapp/static/css/*

pom.xml

+17-19
Original file line numberDiff line numberDiff line change
@@ -131,42 +131,40 @@
131131

132132
<executions>
133133
<execution>
134-
<id>install node and npm</id>
134+
<id>install node and yarn</id>
135135
<goals>
136-
<goal>install-node-and-npm</goal>
136+
<goal>install-node-and-yarn</goal>
137137
</goals>
138138
<configuration>
139139
<nodeVersion>v8.9.4</nodeVersion>
140-
<npmVersion>5.6.0</npmVersion>
140+
<yarnVersion>v1.3.2</yarnVersion>
141141
</configuration>
142142
</execution>
143-
<!-- Uncomment this section if building project for the first time or
144-
the package.json has been updated -->
145-
<!-- <execution> -->
146-
<!-- <id>npm install</id> -->
147-
<!-- <goals> -->
148-
<!-- <goal>npm</goal> -->
149-
<!-- </goals> -->
150-
<!-- Optional configuration which provides for running any npm command -->
151-
<!-- <configuration> -->
152-
<!-- <arguments>install</arguments> -->
153-
<!-- </configuration> -->
154-
<!-- </execution> -->
155143

156144
<execution>
157-
<id>npm run clean</id>
145+
<id>yarn install</id>
146+
<goals>
147+
<goal>yarn</goal>
148+
</goals>
149+
<configuration>
150+
<arguments>install</arguments>
151+
</configuration>
152+
</execution>
153+
154+
<execution>
155+
<id>yarn run clean</id>
158156
<goals>
159-
<goal>npm</goal>
157+
<goal>yarn</goal>
160158
</goals>
161159
<configuration>
162160
<arguments>run clean</arguments>
163161
</configuration>
164162
</execution>
165163

166164
<execution>
167-
<id>npm run start</id>
165+
<id>yarn run start</id>
168166
<goals>
169-
<goal>npm</goal>
167+
<goal>yarn</goal>
170168
</goals>
171169
<configuration>
172170
<arguments>run start</arguments>

src/main/java/com/rc/uam/servlet/HelloWorldServlet.java

-21
This file was deleted.

src/main/webapp/react-app/package.json

+2-4
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"start": "cross-env NODE_ENV=development BABEL_ENV=development webpack --env=development --progress",
88
"prod": "npm run clean && npm run build-prod",
99
"build-prod": "cross-env NODE_ENV=production BABEL_ENV=production webpack --env=production -p --progress",
10-
"clean": "cd ../static && rd /s /q js css",
10+
"clean": "cd ../static && del /S /Q js\\* css\\*",
1111
"test:clean": "rd /s /q coverage",
1212
"test": "jest",
1313
"test:coverage": "jest --coverage",
@@ -38,11 +38,9 @@
3838
"sass-loader": "^6.0.6",
3939
"style-loader": "^0.19.0",
4040
"url-loader": "^0.6.2",
41-
"webpack": "^3.10.0",
42-
"webpack-dev-server": "^2.10.0"
41+
"webpack": "^3.10.0"
4342
},
4443
"dependencies": {
45-
"babel-preset-react-hmre": "^1.1.1",
4644
"prop-types": "^15.6.0",
4745
"react": "^16.2.0",
4846
"react-dom": "^16.2.0",

0 commit comments

Comments
 (0)