Skip to content

Commit 6809a4e

Browse files
update readme.md
1 parent 72d85c1 commit 6809a4e

File tree

6 files changed

+46
-16
lines changed

6 files changed

+46
-16
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,10 @@ can excute this command -> npm build:extracss, to extracss.
9898
<Col :xs="{ span: 11, offset: 1 }" :lg="{ span: 6, offset: 2 }" class="demo-col">Response-Col</Col>
9999
<Col :xs="{ span: 5, offset: 1 }" :lg="{ span: 6, offset: 2 }" class="demo-col">Response-Col</Col>
100100
</Row>
101+
<Row type="flex">
102+
<Col :xs="{ span: 8,order:1 }" :sm="{ span: 8,order:1 }" :md="{ span: 8,order:2 }" :lg="{ span: 8,order:2 }" class="demo-col">response-order-1</Col>
103+
<Col :xs="{ span: 8,order:2 }" :sm="{ span: 8,order:2 }" :md="{ span: 8,order:1 }" :lg="{ span: 8,order:1 }" class="demo-col">Response-order-2</Col>
104+
</Row>
101105
<br>
102106
<Row type="flex" justify="space-between">
103107
<Col :span="4" class="demo-col">

build/util.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
const path = require('path')
2+
function resolve (dir) {
3+
return path.join(__dirname, '..', dir)
4+
}
5+
function assetsPath (_path) {
6+
return path.posix.join('static', _path)
7+
}
8+
9+
module.exports = {
10+
resolve,
11+
assetsPath
12+
}

build/webpack.base.config.js

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
1-
var path = require('path')
2-
var webpack = require('webpack')
1+
const webpack = require('webpack')
32
const VueLoaderPlugin = require('vue-loader/lib/plugin')
4-
function resolve (dir) {
5-
return path.join(__dirname, '..', dir)
6-
}
7-
function assetsPath (_path) {
8-
return path.posix.join('static', _path)
9-
}
10-
3+
const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
4+
const util = require('./util')
5+
const resolve = util.resolve
6+
const assetsPath = util.assetsPath
117
module.exports = {
128
mode: 'production',
139
entry: {
@@ -68,10 +64,9 @@ module.exports = {
6864
},
6965
plugins: [
7066
new VueLoaderPlugin(),
71-
new webpack.DefinePlugin({
72-
'precess.env': {
73-
NODE_ENV: '"production"'
74-
}
67+
new UglifyJsPlugin({
68+
parallel: true,
69+
sourceMap: true,
7570
}),
7671
new webpack.optimize.OccurrenceOrderPlugin(),
7772
]

build/webpack.extracss.config.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,18 @@
11
const merge = require('webpack-merge')
22
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
33
const webpackBaseConfig = require('./webpack.base.config.js')
4-
4+
const util = require('./util')
5+
const resolve = util.resolve
6+
const assetsPath = util.assetsPath
57
module.exports = merge(webpackBaseConfig, {
8+
output: {
9+
path: resolve('/dist'),
10+
publicPath: "/dist/",
11+
filename: 'simple-grid.js',
12+
library: "simple-grid",
13+
libraryTarget: "umd",
14+
umdNamedDefine: true
15+
},
616
module: {
717
rules: [
818
{

build/webpack.no.extracss.config.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,18 @@ const path = require('path');
22
const webpack = require('webpack');
33
const merge = require('webpack-merge');
44
const webpackBaseConfig = require('./webpack.base.config.js');
5-
5+
const util = require('./util');
6+
const resolve = util.resolve;
67

78
module.exports = merge(webpackBaseConfig, {
9+
output: {
10+
path: resolve('/dist'),
11+
publicPath: "/dist/",
12+
filename: 'simple-grid.noextra.js',
13+
library: "simple-grid",
14+
libraryTarget: "umd",
15+
umdNamedDefine: true
16+
},
817
module: {
918
rules: [
1019
{

src/components/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import Col from './col.vue'
22
import Row from './row.vue'
3-
// import '../styles/grid.scss'
3+
import '../styles/grid.scss'
44
export {Col, Row};
55

0 commit comments

Comments
 (0)