Skip to content

Commit

Permalink
Merge pull request #27 from xiaoluoboding/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
xiaoluoboding authored Dec 6, 2019
2 parents 8a7829d + b570dc2 commit 109dd79
Show file tree
Hide file tree
Showing 24 changed files with 311 additions and 498 deletions.
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=favicon.ico><title>vue-smart-widget</title><link href=js/chunk-vendors.816a3708.js rel=preload as=script><link href=js/index.91eca1de.js rel=preload as=script></head><body><noscript><strong>We're sorry but vue-smart-widget doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=js/chunk-vendors.816a3708.js></script><script src=js/index.91eca1de.js></script></body></html>
<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=favicon.ico><title>vue-smart-widget</title><link href=js/chunk-vendors.216a4a1e.js rel=preload as=script><link href=js/index.d6340fe9.js rel=preload as=script></head><body><noscript><strong>We're sorry but vue-smart-widget doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=js/chunk-vendors.216a4a1e.js></script><script src=js/index.d6340fe9.js></script></body></html>
63 changes: 63 additions & 0 deletions docs/js/chunk-vendors.216a4a1e.js

Large diffs are not rendered by default.

63 changes: 0 additions & 63 deletions docs/js/chunk-vendors.816a3708.js

This file was deleted.

1 change: 0 additions & 1 deletion docs/js/index.91eca1de.js

This file was deleted.

1 change: 1 addition & 0 deletions docs/js/index.d6340fe9.js

Large diffs are not rendered by default.

67 changes: 0 additions & 67 deletions lib/vue-smart-widget.common-report.html

This file was deleted.

219 changes: 110 additions & 109 deletions lib/vue-smart-widget.common.js

Large diffs are not rendered by default.

67 changes: 0 additions & 67 deletions lib/vue-smart-widget.umd-report.html

This file was deleted.

223 changes: 112 additions & 111 deletions lib/vue-smart-widget.umd.js

Large diffs are not rendered by default.

67 changes: 0 additions & 67 deletions lib/vue-smart-widget.umd.min-report.html

This file was deleted.

4 changes: 2 additions & 2 deletions lib/vue-smart-widget.umd.min.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-smart-widget",
"version": "0.5.2",
"version": "0.5.3",
"description": "Smart widget is a flexible and extensible content container component for Vue2.5+.",
"author": "xiaoluoboding <xiaoluoboding@gmail.com>",
"scripts": {
Expand Down Expand Up @@ -32,15 +32,14 @@
],
"license": "MIT",
"dependencies": {
"core-js": "^3.4.2",
"vue": "^2.6.10",
"vue-grid-layout": "^2.3.7"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^4.0.5",
"@vue/cli-plugin-eslint": "^4.0.5",
"@vue/cli-service": "^4.0.5",
"@vue/eslint-config-standard": "^4.0.0",
"core-js": "^3.4.2",
"babel-eslint": "^10.0.1",
"echarts": "^4.5.0",
"element-ui": "^2.13.0",
Expand All @@ -53,6 +52,7 @@
"postcss-url": "^8.0.0",
"svg-sprite-loader": "^4.1.6",
"v-tooltip": "^2.0.2",
"vue": "^2.6.10",
"ve-charts": "^0.8.3",
"vue-router": "^3.0.3",
"vue-template-compiler": "^2.6.10",
Expand Down
1 change: 1 addition & 0 deletions src/assets/icons/collapse.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/assets/icons/expand.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
1 change: 1 addition & 0 deletions src/assets/icons/loading.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/assets/icons/refresh.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
1 change: 0 additions & 1 deletion src/assets/img/collapse.svg

This file was deleted.

1 change: 0 additions & 1 deletion src/assets/img/expand.svg

This file was deleted.

1 change: 0 additions & 1 deletion src/assets/img/loading.svg

This file was deleted.

1 change: 0 additions & 1 deletion src/assets/img/refresh.svg

This file was deleted.

2 changes: 1 addition & 1 deletion src/plugins/svg-icon.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
const req = require.context('../assets/img', false, /\.svg$/)
const req = require.context('../assets/icons', false, /\.svg$/)
const requireAll = requireContext => requireContext.keys().map(requireContext)
requireAll(req)
16 changes: 14 additions & 2 deletions vue.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const path = require('path')

const isProd = process.env.NODE_ENV === 'production'
const isLib = process.env.VUE_APP_BUILD_MODE === 'lib'
const resolve = dir => path.join(__dirname, dir)

const setChainWebpack = config => {
Expand All @@ -19,13 +20,13 @@ const setChainWebpack = config => {
config.module
.rule('svg')
.exclude
.add(resolve('src/assets/img'))
.add(resolve('src/assets/icons'))
.end()
config.module
.rule('icons')
.test(/\.svg$/)
.include
.add(resolve('src/assets/img'))
.add(resolve('src/assets/icons'))
.end()
.use('svg-sprite-loader')
.loader('svg-sprite-loader')
Expand All @@ -50,6 +51,16 @@ const setChainWebpack = config => {
}
}

const setConfigureWebpack = config => {
if (isLib) {
config.output = {
...config.output,
library: 'VueSmartWidget',
libraryExport: 'default'
}
}
}

module.exports = {
publicPath: './',
pages: {
Expand All @@ -60,6 +71,7 @@ module.exports = {
lintOnSave: true,
productionSourceMap: false,
chainWebpack: config => setChainWebpack(config),
configureWebpack: config => setConfigureWebpack(config),
css: {
extract: false
},
Expand Down

0 comments on commit 109dd79

Please sign in to comment.