Browse Source

KERNEL-4727 refactor: 【平台】使用babel-preset-fineui插件配置babel

research/10.0
zsmj1994 5 years ago
parent
commit
7a728342e7
  1. 2
      config/jest.environment.js
  2. 50
      index.html
  3. 10
      package.json
  4. 2
      webpack/webpack.dev.js

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>

10
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",
@ -60,8 +54,8 @@
"@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",

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