Skip to content

Commit

Permalink
修改demo
Browse files Browse the repository at this point in the history
Signed-off-by: linhaifeng <[email protected]>
  • Loading branch information
linhaifeng committed Sep 30, 2017
1 parent d23395d commit b061625
Show file tree
Hide file tree
Showing 9 changed files with 178 additions and 183 deletions.
317 changes: 155 additions & 162 deletions calendar/.idea/workspace.xml

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions calendar/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<img width = "384" src="doc/2.gif"/>
<img width = "300" src="doc/12.png"/>

##目录结构
## 目录结构

demo 用vue-cli 的webpack-simple构建的
```
Expand All @@ -34,7 +34,7 @@ calendar
   |main.js
```

##组件使用
## 组件使用
>安装
```javascript
npm i vue2-datepick --save
Expand Down
6 changes: 3 additions & 3 deletions calendar/dist/build.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion calendar/dist/build.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions calendar/dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion calendar/dist/index.js.map

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions calendar/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@
"vue日期选择"
],
"description": "A Vue.js project,vue-calendar,vuejs,vue",
"version": "2.0.1",
"version": "2.0.3",
"author": "linhf <[email protected]>",
"private": false,
"main": "./dist/index.js",
"scripts": {
"dev": "cross-env NODE_ENV=development webpack-dev-server --hot --port 8889 --host 127.0.0.1",
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules"
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules",
"publish":"cross-env NODE_ENV=publish webpack --progress --hide-modules"
},
"dependencies": {
"object-assign": "^4.1.1",
Expand Down
1 change: 0 additions & 1 deletion calendar/src/modules/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@

import CalendarMain from '../components/calendarMain.vue'
import { mergeOptions } from './util'
import '../css/style.scss'
import '../css/calendar.scss'


Expand Down
20 changes: 11 additions & 9 deletions calendar/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,18 @@ module.exports = {
devtool: '#eval-source-map'
}

if (process.env.NODE_ENV === 'production') {
if (process.env.NODE_ENV === 'production'||process.env.NODE_ENV === 'publish') {

module.exports.entry = {
index: './src/index.js',
},
module.exports.output = {
path: path.resolve(__dirname, './dist'),
filename: '[name].js',
library: 'vue-calendar',
libraryTarget: 'commonjs2'
if(process.env.NODE_ENV === 'publish'){
module.exports.entry = {
index: './src/index.js',
},
module.exports.output = {
path: path.resolve(__dirname, './dist'),
filename: '[name].js',
library: 'vue-calendar',
libraryTarget: 'commonjs2'
}
}


Expand Down

0 comments on commit b061625

Please sign in to comment.