console\src\main\resources\static\console-fe 挪到根目录并改名为 console-ui (#4174)
1
.gitignore
vendored
@ -15,3 +15,4 @@ derby.log
|
||||
work
|
||||
test/logs
|
||||
derby.log
|
||||
yarn.lock
|
50
console-ui/README.md
Normal file
@ -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',
|
||||
}],
|
||||
```
|
@ -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');
|
||||
|
@ -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)) {
|
@ -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/"'
|
||||
}
|
||||
}
|
||||
})
|
@ -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",
|
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 39 KiB |
Before Width: | Height: | Size: 114 B After Width: | Height: | Size: 114 B |
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |