Skip to content
This repository has been archived by the owner on Jul 17, 2020. It is now read-only.

Commit

Permalink
Merge pull request #3 from BelinChung/master
Browse files Browse the repository at this point in the history
add webpack.build.js file
  • Loading branch information
aidenZou committed Dec 15, 2015
2 parents 5fd5606 + 5ef8a57 commit 8c98d1b
Show file tree
Hide file tree
Showing 55 changed files with 2,240 additions and 22 deletions.
2,021 changes: 2,021 additions & 0 deletions dist/vue-weui.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/vue-weui.js.map

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions dist/vue-weui.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions example/modules/App.vue
Expand Up @@ -17,8 +17,8 @@
</template>

<style lang="less">
// @import "../style/weui.less";
@import "../style/base/reset";
// @import "../../src/style/weui.less";
@import "../../src/style/base/reset";
html, body {
height: 100%;
Expand Down
2 changes: 1 addition & 1 deletion example/modules/ArticleView.vue
Expand Up @@ -35,7 +35,7 @@ export default {
</script>

<style lang="less">
@import "../style/base/fn";
@import "../../src/style/base/fn";
.weui_article {
padding: 20px 15px;
Expand Down
4 changes: 2 additions & 2 deletions example/modules/ButtonView.vue
Expand Up @@ -60,8 +60,8 @@ export default {

<style lang="less">
// @import "../style/base/fn";
@import "../style/widget/weui_button/weui_button.less";
// @import "../../src/style/base/fn";
@import "../../src/style/widget/weui_button/weui_button.less";
// // 存在样式优先级的问题,故这里对其他weui_btn的引用放在底部
// // 主要是button.weui_btn在weui_btn_plain下重写border-width
Expand Down
10 changes: 5 additions & 5 deletions example/modules/CellView.vue
Expand Up @@ -312,10 +312,10 @@ export default {
</script>

<style lang="less">
@import "../style/widget/weui_cell/weui_cell_global";
@import "../../src/style/widget/weui_cell/weui_cell_global";
@import "../style/widget/weui_cell/weui_access";
@import "../style/widget/weui_cell/weui_check";
@import "../style/widget/weui_cell/weui_form";
@import "../style/widget/weui_cell/weui_switch";
@import "../../src/style/widget/weui_cell/weui_access";
@import "../../src/style/widget/weui_cell/weui_check";
@import "../../src/style/widget/weui_cell/weui_form";
@import "../../src/style/widget/weui_cell/weui_switch";
</style>
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -22,7 +22,7 @@
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"dev": "webpack-dev-server --inline --hot --quiet",
"build": "NODE_ENV=production webpack --progress --hide-modules"
"build": "webpack --progress --hide-modules --config webpack.build.min.js && webpack --progress --hide-modules --config webpack.build.js"
},
"repository": {
"type": "git",
Expand Down
4 changes: 2 additions & 2 deletions src/action-sheet/ActionSheet.vue → src/ActionSheet.vue
Expand Up @@ -20,7 +20,7 @@
</template>

<script>
import Mask from '../Mask.vue'
import Mask from './Mask.vue'
export default {
name:'ActionSheet',
Expand Down Expand Up @@ -76,7 +76,7 @@ export default {
</script>

<style lang="less">
@import "../../style/base/fn";
@import "./style/base/fn";
@bgColor:#ECECEC;
.weui_actionsheet {
Expand Down
2 changes: 1 addition & 1 deletion src/dialog/Dialog.vue → src/Dialog.vue
@@ -1,6 +1,6 @@
<style lang="less">
@import "../../style/base/fn";
@import "./style/base/fn";
@weuiDialogBackgroudColor: #FAFAFC;
@weuiDialogLineColor: #D5D5D6;
@weuiDialogLinkColor: #3CC51F;
Expand Down
137 changes: 137 additions & 0 deletions src/Icon.vue

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/toast/Loading.vue → src/Loading.vue
Expand Up @@ -21,6 +21,6 @@ export default {
</script>

<style lang="less">
@import "../../style/base/fn";
@import "./style/base/fn";
</style>
2 changes: 1 addition & 1 deletion src/Mask.vue
Expand Up @@ -21,7 +21,7 @@ export default {
</script>

<style lang="less">
@import "../style/base/fn";
@import "./style/base/fn";
.weui_mask {
position: fixed;
Expand Down
4 changes: 2 additions & 2 deletions src/msg/Msg.vue → src/Msg.vue
Expand Up @@ -29,8 +29,8 @@ export default {
</script>

<style lang="less">
@import "../../style/base/fn";
// @import "../weui_button";
@import "./style/base/fn";
// @import "./weui_button";
.weui_msg {
padding-top: @weuiMsgPaddingTop;
Expand Down
4 changes: 2 additions & 2 deletions src/progress/Progress.vue → src/Progress.vue
@@ -1,6 +1,6 @@
<style lang="less">
@import "../../style/base/fn.less";
@import "./style/base/fn.less";
.weui_progress {
display: flex;
align-items: center;
Expand Down Expand Up @@ -41,7 +41,7 @@

<script>
import Icon from '../icon/Icon.vue'
import Icon from './Icon.vue'
export default {
name: 'Progress',
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions src/toast/Toast.vue → src/Toast.vue
Expand Up @@ -9,7 +9,7 @@
</template>

<script>
import Icon from '../icon/Icon.vue'
import Icon from './Icon.vue'
/**
* 组件内部自动关闭
Expand Down Expand Up @@ -42,7 +42,7 @@ export default {
</script>

<style lang="less">
@import "../../style/base/fn";
@import "./style/base/fn";
.weui_toast {
position: fixed;
Expand Down
File renamed without changes.
25 changes: 25 additions & 0 deletions src/index.js
@@ -0,0 +1,25 @@
import actionSheet from './ActionSheet.vue'
import select from './Select.vue'
import dialog from './Dialog.vue'
import icon from './Icon.vue'
import msg from './Msg.vue'
import toolTips from './ToolTips.vue'
import progress from './Progress.vue'
import toast from './Toast.vue'
import loading from './Loading.vue'
import mask from './Mask.vue'

const VueWeui = {
actionSheet,
select,
dialog,
icon,
msg,
toolTips,
progress,
toast,
loading,
mask
}

module.exports = VueWeui
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
14 changes: 14 additions & 0 deletions webpack.build.js
@@ -0,0 +1,14 @@
var config = require('./webpack.config.js')

config.entry = {
'vue-weui': './src/index.js',
}

config.output = {
filename: './dist/[name].js',
library: 'VueWeui',
libraryTarget: 'umd'
}


module.exports = config
18 changes: 18 additions & 0 deletions webpack.build.min.js
@@ -0,0 +1,18 @@
var config = require('./webpack.build.js')
var webpack = require('webpack')


config.output.filename = config.output.filename.replace(/\.js$/, '.min.js')

delete config.devtool

config.plugins = [
new webpack.optimize.UglifyJsPlugin({
sourceMap: false,
compress: {
warnings: false
}
})
]

module.exports = config

0 comments on commit 8c98d1b

Please sign in to comment.