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. 48
      index.html
  5. 13
      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) { module.exports = function (api) {
api.cache(true); return require("@fui/babel-preset-fineui").configs.base(api)
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,
};
}; };

2
config/jest.environment.js

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

48
index.html

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

13
package.json

@ -16,12 +16,6 @@
"nprogress": "0.2.0" "nprogress": "0.2.0"
}, },
"devDependencies": { "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", "@types/jest": "24.0.11",
"@typescript-eslint/eslint-plugin": "1.7.0", "@typescript-eslint/eslint-plugin": "1.7.0",
"@typescript-eslint/parser": "1.7.0", "@typescript-eslint/parser": "1.7.0",
@ -57,12 +51,11 @@
"webpack-cli": "3.3.5", "webpack-cli": "3.3.5",
"webpack-dev-server": "3.7.2", "webpack-dev-server": "3.7.2",
"webpack-merge": "4.2.1", "webpack-merge": "4.2.1",
"ydoc": "4.1.0", "@fui/babel-preset-fineui": "^1.0.0"
"ydoc-plugin-jsdoc": "0.0.3"
}, },
"optionalDependencies": { "optionalDependencies": {
"fineui": "git+ssh://git@cloud.finedevelop.com:7999/visual/fineui.git", "fineui": "^2.0.0",
"fineui-materials": "git+ssh://git@cloud.finedevelop.com:7999/fui/fineui-materials.git#release/10.0" "@fui/materials": "10.0.0-release - 10.0.0-release.99999999999999"
}, },
"scripts": { "scripts": {
"dev": "cross-env NODE_ENV=mock webpack-dev-server -p --progress --config=webpack/webpack.dev.js --mode development --open", "dev": "cross-env NODE_ENV=mock webpack-dev-server -p --progress --config=webpack/webpack.dev.js --mode development --open",

2
webpack/webpack.dev.js

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

Loading…
Cancel
Save