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

调整前端工程目录 (Move console fe to root) #4174

Merged
merged 9 commits into from
Nov 9, 2020
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ derby.log
work
test/logs
derby.log
yarn.lock
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
50 changes: 50 additions & 0 deletions console-ui/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# 开始项目
国内访问 npm 比较慢,我们可以使用阿里的镜像,
在 npm 或者 yarn 命令后面加参数:
> --registry=https://registry.npm.taobao.org
例:
```
npm install --registry=https://registry.npm.taobao.org
yarn --registry=https://registry.npm.taobao.org
```
[详情地址: http://npm.taobao.org/](http://npm.taobao.org/)
## 安装依赖
```sh
yarn
```
```
npm install
```

## 启动
```sh
yarn start
```
```
npm start
```

## 构建打包
```sh
yarn build
```
```
npm run build
```
##

# 代理配置
`build/webpack.dev.conf.js`
修改proxy属性

```
proxy: [{
context: ['/'],
changeOrigin: true,
secure: false,
target: 'http://ip:port',
}],
```
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const styles = {
};

const distPath = path.join(__dirname, '../dist/');
const rootPath = path.join(__dirname, '../../');
const rootPath = path.join(__dirname, '../../console/src/main/resources/static/');

console.log('\n\n> Start copying the dist directory...\n');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const path = require('path');
// 默认打包存放地址
const srcDir = path.join(__dirname, '../dist');
// 打包后文件存放地址
const destDir = path.join(__dirname, '../../');
const destDir = path.join(__dirname, '../../console/src/main/resources/static/');

const mkdir = dir => {
if (!fs.existsSync(dir)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ cssLoader.use.push({
loader: '@alifd/next-theme-loader',
options: {
modifyVars: {
'$icon-font-path': '"/nacos/console-fe/public/icons/icon-font"',
'$font-custom-path': '"/nacos/console-fe/public/fonts/"'
'$icon-font-path': '"/nacos/icons/icon-font"',
'$font-custom-path': '"/nacos/fonts/"'
}
}
})
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "console-fe",
"name": "console-ui",
"version": "1.0.0",
"description": "console fe",
"description": "console ui",
"main": "index.js",
"scripts": {
"start": "cross-env NODE_ENV=development webpack-dev-server --config build/webpack.dev.conf.js",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
60 changes: 0 additions & 60 deletions console/src/main/resources/static/console-fe/README.md

This file was deleted.

1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,7 @@
<exclude>**/consistency/entity/**</exclude>
<exclude>**/*.txt</exclude>
<exclude>**/*.factories</exclude>
<exclude>/console-ui/**</exclude>
</excludes>
</configuration>
<executions>
Expand Down