Last active
January 28, 2018 18:22
-
-
Save pramoth/0e13b21989f7f7388797fc3df99c5478 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <profile> | |
| <id>prod</id> | |
| <properties> | |
| <spring.profiles.active>prod</spring.profiles.active> | |
| </properties> | |
| <build> | |
| <plugins> | |
| <plugin> | |
| <groupId>org.codehaus.mojo</groupId> | |
| <artifactId>exec-maven-plugin</artifactId> | |
| <version>1.6.0</version> | |
| <executions> | |
| <!-- อันนี้คือ npm install --> | |
| <execution> | |
| <id>npm install</id> | |
| <goals> | |
| <goal>exec</goal> | |
| </goals> | |
| <phase>initialize</phase> | |
| <configuration> | |
| <executable>npm</executable> | |
| <arguments> | |
| <argument>install</argument> | |
| </arguments> | |
| <workingDirectory>${project.basedir}/src/main/web</workingDirectory> | |
| </configuration> | |
| </execution> | |
| <execution> | |
| <!-- อันนี้คือ ng build --prod แต่ว่ารันผ่าน node เนื่องจากต้องการแรมเพิ่ม--> | |
| <id>ng build</id> | |
| <goals> | |
| <goal>exec</goal> | |
| </goals> | |
| <phase>initialize</phase> | |
| <configuration> | |
| <executable>node</executable> | |
| <arguments> | |
| <!-- อันนี้สำหรับ project ที่ใหญ่ ต้องใช้ mem เยอะหน่อย ปกติก็ไม่จำเป็นถ้าไม่ out of mem--> | |
| <argument>--max_old_space_size=3048</argument> | |
| <!-- ไม่ต้องติดตั้ง ng cli ในเครื่องนะครับ จะได้ portable รันใน node_modules เลย --> | |
| <argument>./node_modules/.bin/ng</argument> | |
| <argument>build</argument> | |
| <argument>--prod</argument> | |
| </arguments> | |
| <workingDirectory>${project.basedir}/src/main/web</workingDirectory> | |
| </configuration> | |
| </execution> | |
| </executions> | |
| </plugin> | |
| </plugins> | |
| </build> | |
| </profile> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment