forked from jd-opensource/nutui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/v2'
- Loading branch information
Showing
27 changed files
with
703 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
name: '缺陷问题反馈' | ||
about: '如何正确的提出一个 Issue' | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
<!-- | ||
感谢您向我们反馈问题,为了高效的解决问题,我们期望你能提供以下信息: | ||
--> | ||
|
||
## What happens? | ||
<!-- 清晰的描述下遇到的问题。--> | ||
|
||
## 最小可复现仓库 | ||
> 请创建最小可复现代码,并上传到你的 GitHub 仓库 | ||
<!-- https://github.com/YOUR_REPOSITORY_URL --> | ||
## 预期的行为和实际行为 | ||
|
||
|
||
## 复现步骤,具体代码 | ||
|
||
|
||
<!-- 请提供复现步骤,错误日志以及相关配置 --> | ||
<!-- 可以尝试不要锁版本,重新安装依赖试试先 --> | ||
|
||
|
||
## 相关环境信息 | ||
- **操作系统**: | ||
- **Node 版本**: | ||
- **NutUI 版本**: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
const config = require('../package.json'); | ||
const path = require('path'); | ||
const webpackBaseConf = require('./webpack.base.conf.js'); | ||
const HtmlWebpackPlugin = require('html-webpack-plugin'); | ||
const MiniCssExtractPlugin = require("mini-css-extract-plugin"); | ||
const merge = require('webpack-merge'); | ||
const mdtohtml = require('../scripts/mdToVue'); | ||
const isDev = process.env.NODE_ENV === 'development'; | ||
|
||
|
||
module.exports = merge(webpackBaseConf, { | ||
mode: 'development', | ||
entry: { | ||
'nutui-mobile': './sites/demo/app.js', | ||
'nutui-doc': './sites/doc/app.js', | ||
}, | ||
output: { | ||
publicPath: '/', | ||
filename: '[name].js', | ||
}, | ||
module: { | ||
rules: [ | ||
//自定义主题 | ||
// { | ||
// test: /\.(sa|sc|c)ss$/, | ||
// use: [ | ||
// { | ||
// loader: 'sass-loader', | ||
// options: { | ||
// data: `@import "./sites/demo/asset/css/custom.scss";@import "./src/styles/index.scss"; `, | ||
// }, | ||
// } | ||
// ], | ||
// } | ||
] | ||
}, | ||
optimization: { | ||
splitChunks: { | ||
cacheGroups: { | ||
chunks: { | ||
chunks: 'all', | ||
minChunks: 2, | ||
minSize: 0, | ||
name: 'chunks' | ||
} | ||
} | ||
} | ||
}, | ||
plugins: [ | ||
//demo | ||
new HtmlWebpackPlugin({ | ||
template: './sites/demo/index.html', | ||
filename: 'demo.html', | ||
hash: true,//防止缓存 | ||
inject: true, | ||
chunks: ['chunks', 'nutui-mobile'], | ||
minify: { | ||
multihtmlCache: true,// 解决多页打包的关键! | ||
minifyJS: true, | ||
minifyCSS: true, | ||
removeAttributeQuotes: true//压缩 去掉引号 | ||
} | ||
}), | ||
// doc | ||
new mdtohtml({ | ||
entry: './src', | ||
output: './sites/doc/view/', | ||
template: './doc-site/template.html', | ||
nav: 'left', | ||
needCode: true, | ||
isbuild: isDev, | ||
hasMarkList: false | ||
}), | ||
new mdtohtml({ | ||
entry: './docs', | ||
output: './sites/doc/page/', | ||
template: './doc-site/template.html', | ||
nav: 'left', | ||
needCode: false, | ||
isbuild: isDev | ||
}), | ||
new HtmlWebpackPlugin({ | ||
template: './sites/doc/index.html', | ||
filename: 'default.html', | ||
hash: true,//防止缓存 | ||
inject: true, | ||
chunks: ['chunks', 'nutui-doc'], | ||
minify: { | ||
multihtmlCache: true,// 解决多页打包的关键! | ||
minifyJS: true, | ||
minifyCSS: true, | ||
removeAttributeQuotes: true//压缩 去掉引号 | ||
} | ||
}), | ||
], | ||
devtool: 'cheap-module-eval-source-map', | ||
devServer: { | ||
contentBase: path.resolve(__dirname, 'dist/sites'), | ||
compress: true, | ||
index: 'default.html', | ||
historyApiFallback: true, | ||
disableHostCheck: true, | ||
host: "0.0.0.0", | ||
hot: true, | ||
hotOnly: true, | ||
inline: true, | ||
overlay: { | ||
warnings: true, | ||
errors: true | ||
}, | ||
watchOptions: { | ||
ignored: /node_modules/ | ||
} | ||
} | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,6 +54,7 @@ | |
blockquote { | ||
padding: 0; | ||
margin: 0; | ||
margin-top: 10px; | ||
p { | ||
margin: 0; | ||
display: inline-block; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.