Browse Source

Merge pull request #193 in DEC/decision-webui-dcm from release/10.0 to bugfix/10.0

* commit '973fe5ca553d117b92c014152f879e3322a30419':
  KERNEL-4727 refactor: 【平台】使用babel-preset-fineui插件配置babel
  KERNEL-4727 refactor: 【平台】使用babel-preset-fineui插件配置babel
bugfix/10.0
superman 4 years ago
parent
commit
22b9387fc2
  1. 2
      .npmrc
  2. 30
      babel.config.js
  3. 2
      config/jest.environment.js
  4. 50
      index.html
  5. 15
      package.json
  6. 2
      webpack/webpack.dev.js

2
.npmrc

@ -0,0 +1,2 @@
puppeteer_download_host=https://npm.taobao.org/mirrors
@fui:registry=https://npm.fineres.com/

30
babel.config.js

@ -1,29 +1,3 @@
module.exports = function(api) {
api.cache(true);
const presets = [
[
'@babel/preset-env',
{
targets: {
ie: 9,
chrome: 47,
},
},
],
'@babel/preset-typescript',
];
const plugins = [
[
'@babel/plugin-proposal-decorators',
{
legacy: true,
},
],
'@babel/plugin-proposal-class-properties',
];
return {
presets,
plugins,
};
module.exports = function (api) {
return require("@fui/babel-preset-fineui").configs.base(api)
};

2
config/jest.environment.js

@ -12,7 +12,7 @@ class FineUiEnvironment extends JsdomEnvironment {
[
'../node_modules/fineui/dist/fineui.js',
'../node_modules/fineui-materials/docs/materials.js',
'../node_modules/@fui/materials/docs/materials.js',
'../config/fineui.prepare.js',
'./fineui.setup.js',
].forEach(scriptRelativePath => {

50
index.html

@ -1,34 +1,22 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Fine Report</title>
<!--核心css文件-->
<link
rel="preload"
href="./node_modules/fineui/dist/font/iconfont.woff"
as="font"
type="font/woff"
crossorigin=""
/>
<link
rel="stylesheet"
type="text/css"
href="./node_modules/fineui/dist/fineui.min.css"
/>
<link
rel="stylesheet"
type="text/css"
href="./node_modules/fineui-materials/docs/materials.css"
/>
</head>
<body id="body">
<div id="wrapper"></div>
<script src="./node_modules/fineui/dist/fineui.min.js"></script>
<script src="./node_modules/fineui/i18n/i18n.cn.js"></script>
<script src="./node_modules/fineui-materials/docs/materials.js"></script>
<script src="./assets/scripts/dec.js"></script>
<script src="./redis.js"></script>
</body>
</html>
<head>
<meta charset="UTF-8" />
<title>Fine Report</title>
<!--核心css文件-->
<link rel="preload" href="./node_modules/fineui/dist/font/iconfont.woff" as="font" type="font/woff" crossorigin="" />
<link rel="stylesheet" type="text/css" href="./node_modules/fineui/dist/fineui.css" />
<link rel="stylesheet" type="text/css" href="./node_modules/@fui/materials/docs/materials.css" />
</head>
<body id="body">
<div id="wrapper"></div>
<script src="./node_modules/fineui/dist/fineui.js"></script>
<script src="./node_modules/fineui/dist/utils.js"></script>
<script src="./node_modules/@fui/materials/docs/materials.js"></script>
<script src="./assets/scripts/dec.js"></script>
<script src="./redis.js"></script>
</body>
</html>

15
package.json

@ -16,12 +16,6 @@
"nprogress": "0.2.0"
},
"devDependencies": {
"@babel/core": "7.4.5",
"@babel/plugin-proposal-class-properties": "^7.5.0",
"@babel/plugin-proposal-decorators": "7.4.4",
"@babel/polyfill": "^7.8.3",
"@babel/preset-env": "7.4.5",
"@babel/preset-typescript": "7.3.3",
"@types/jest": "24.0.11",
"@typescript-eslint/eslint-plugin": "1.7.0",
"@typescript-eslint/parser": "1.7.0",
@ -57,12 +51,11 @@
"webpack-cli": "3.3.5",
"webpack-dev-server": "3.7.2",
"webpack-merge": "4.2.1",
"ydoc": "4.1.0",
"ydoc-plugin-jsdoc": "0.0.3"
"@fui/babel-preset-fineui": "^1.0.0"
},
"optionalDependencies": {
"fineui": "git+ssh://git@cloud.finedevelop.com:7999/visual/fineui.git",
"fineui-materials": "git+ssh://git@cloud.finedevelop.com:7999/fui/fineui-materials.git#release/10.0"
"fineui": "^2.0.0",
"@fui/materials": "10.0.0-release - 10.0.0-release.99999999999999"
},
"scripts": {
"dev": "cross-env NODE_ENV=mock webpack-dev-server -p --progress --config=webpack/webpack.dev.js --mode development --open",
@ -79,4 +72,4 @@
"pre-push": "npm run eslint && npm run test"
}
}
}
}

2
webpack/webpack.dev.js

@ -36,7 +36,7 @@ chokidar
module.exports = merge(common, {
devtool: 'eval-source-map',
entry: {
show: ['babel-polyfill', './src/i18n.ts', './src/request.ts', './src/index.ts'],
show: ['./src/i18n.ts', './src/request.ts', './src/index.ts'],
},
output: {
path: dirs.DEST,

Loading…
Cancel
Save