Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature][web] added npm profiles #3741

Merged
merged 5 commits into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions dinky-web/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@
<goal>npm</goal>
</goals>
<configuration>
<!-- 国内npm源加速可在后面加入(去掉空格) - -registry https://repo.huaweicloud.com/repository/npm/ -->
<arguments>install --force</arguments>
<!-- For domestic npm source acceleration, you can check the profile of npm Huawei or npm Taobao -->
<arguments>install --force --registry ${npm-registry-repo}</arguments>
</configuration>
</execution>
<execution>
Expand Down
2 changes: 2 additions & 0 deletions docs/docs/deploy_guide/compile_deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ cd /opt/dinky-source-code

# 编译打包 Profile, 注意 scala 支持 2.11 和 2.12, 请根据实际情况进行选择,jdk 支持 8/11,请根据实际情况进行选择,不选jdk11默认使用系统内的jdk8
mvn clean package -DskipTests=true -P prod,jdk11,flink-single-version,aliyun,flink-1.16,web
# 如果需要前端依赖下载源为华为镜像,请添加 npm-huawei profile, 否则默认使用 npm 官方源, 编译命令如下:
mvn clean package -DskipTests=true -P prod,jdk11,flink-single-version,aliyun,flink-1.16,web,npm-huawei

```

Expand Down
2 changes: 2 additions & 0 deletions docs/docs/developer_guide/local_debug.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ Install/Package 过程中报错代码格式化问题,请参考 [代码格式化]
| jdk11 | 用于指定 JDK 版本为 11,前提是本地已经安装了 JDK 11,如果没有安装 jdk11,则默认使用本地的 jdk8 |
| mac | 用于适配在 mac 系统上进行调试 |
| maven-central | 用于指定 maven 仓库为中央仓库 |
| npm-huawei | 默认在编译时前端依赖下载源为 npm 国外的官方仓库,如果需要使用**华为镜像**,请勾选此 profile |
| npm-taobao | 默认在编译时前端依赖下载源为 npm 国外的官方仓库,如果需要使用**淘宝镜像**,请勾选此 profile |
| prod | 生产环境,默认选中,此功能主要用于编译打包,此 profile 会将部分依赖排除掉,不会打进最终 tar.gz 包内 |
| web | 打包前端资源,需要勾选 |

Expand Down
15 changes: 15 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
<mockito.version>3.12.4</mockito.version>
<mybatis-plus-boot-starter.version>3.5.7</mybatis-plus-boot-starter.version>
<mysql-connector-java.version>8.0.28</mysql-connector-java.version>
<npm-registry-repo>https://registry.npmjs.org/</npm-registry-repo>
<ojdbc8.version>12.2.0.1</ojdbc8.version>
<org.commonmark>0.21.0</org.commonmark>
<oshi.version>6.4.2</oshi.version>
Expand Down Expand Up @@ -1012,6 +1013,20 @@
</properties>
</profile>

<profile>
<id>npm-huawei</id>
<properties>
<npm-registry-repo>https://repo.huaweicloud.com/repository/npm/</npm-registry-repo>
</properties>
</profile>

<profile>
<id>npm-taobao</id>
<properties>
<npm-registry-repo>https://registry.npmmirror.com/</npm-registry-repo>
</properties>
</profile>

<profile>
<id>prod</id>
<activation>
Expand Down
Loading