forked from jcc/v-distpicker
-
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.
- Loading branch information
0 parents
commit 88ecde2
Showing
20 changed files
with
4,909 additions
and
0 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,6 @@ | ||
{ | ||
"presets": [ | ||
["es2015", {"modules": false}] | ||
], | ||
"plugins": ["transform-runtime"] | ||
} |
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,9 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true |
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,2 @@ | ||
node_modules/* | ||
build/* |
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,33 @@ | ||
{ | ||
"parser": "babel-eslint", | ||
"env": { | ||
"browser": true, | ||
"commonjs": true, | ||
"es6": true, | ||
"node": true | ||
}, | ||
"parserOptions": { | ||
"ecmaVersion": 8, | ||
"sourceType": "module" | ||
}, | ||
"rules": { | ||
"no-const-assign": "warn", | ||
"no-this-before-super": "warn", | ||
"no-undef": "warn", | ||
"no-unreachable": "warn", | ||
"no-unused-vars": "warn", | ||
"constructor-super": "warn", | ||
"valid-typeof": "warn", | ||
"semi": [ | ||
"warn", | ||
"never" | ||
], | ||
"quotes": [ | ||
"warn", | ||
"single" | ||
], | ||
"arrow-parens": 0, | ||
"generator-star-spacing": 0, | ||
"space-before-function-paren": 0 | ||
} | ||
} |
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,4 @@ | ||
.DS_Store | ||
node_modules/ | ||
npm-debug.log | ||
yarn-error.log |
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,15 @@ | ||
# v-distpicker | ||
|
||
> A flexible, highly available district selector for picking provinces, cities and districts of China. | ||
## Build Setup | ||
|
||
``` bash | ||
# install dependencies | ||
npm install | ||
|
||
# serve with hot reload at localhost:8080 | ||
npm run dev | ||
|
||
# build for production with minification | ||
npm run build |
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,55 @@ | ||
const path = require('path') | ||
const HtmlWebpackPlugin = require('html-webpack-plugin') | ||
|
||
module.exports = { | ||
entry: './examples/main.js', | ||
resolve: { | ||
extensions: ['*', '.js', '.vue'], | ||
alias: { | ||
main: path.resolve(__dirname, '../src') | ||
}, | ||
}, | ||
output: { | ||
path: path.resolve(__dirname, '../dist/dev'), | ||
publicPath: '/', | ||
filename: 'v-distpicker.js' | ||
}, | ||
devServer: { | ||
contentBase: path.resolve(__dirname, '../dist/dev'), | ||
compress: false, | ||
port: 8080 | ||
}, | ||
plugins: [ | ||
new HtmlWebpackPlugin({ | ||
filename: path.resolve(__dirname, '../dist/dev/index.html'), | ||
template: 'examples/index.html', | ||
inject: true | ||
}) | ||
], | ||
module: { | ||
loaders: [{ | ||
test: /\.vue$/, | ||
loader: 'vue-loader', | ||
options: { | ||
loaders: { | ||
scss: 'vue-style-loader!css-loader!sass-loader', | ||
sass: 'vue-style-loader!css-loader!sass-loader?indentedSyntax' | ||
} | ||
} | ||
}, { | ||
test: /\.js$/, | ||
loaders: ['babel-loader', 'eslint-loader'], | ||
exclude: /node_modules/ | ||
}, { | ||
test: /\.css$/, | ||
loader: 'style-loader!css-loader' | ||
}, { | ||
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/, | ||
loader: 'url-loader', | ||
query: { | ||
limit: 10000, | ||
name: 'img/[name].[hash:7].[ext]' | ||
} | ||
}] | ||
} | ||
} |
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,41 @@ | ||
const path = require('path') | ||
const webpack = require('webpack'); | ||
|
||
module.exports = { | ||
entry: './src/index.js', | ||
resolve: { | ||
extensions: ['*', '.js', '.vue'] | ||
}, | ||
output: { | ||
path: path.resolve(__dirname, '../dist'), | ||
filename: 'v-distpicker.js', | ||
library: 'VDistpicker', | ||
libraryTarget: 'umd' | ||
}, | ||
plugins: [ | ||
new webpack.optimize.UglifyJsPlugin({ | ||
minimize : true, | ||
sourceMap : false, | ||
mangle: true, | ||
compress: { | ||
warnings: false | ||
} | ||
}) | ||
], | ||
module: { | ||
loaders: [{ | ||
test: /\.vue$/, | ||
loader: 'vue-loader', | ||
options: { | ||
loaders: { | ||
scss: 'vue-style-loader!css-loader!sass-loader', | ||
sass: 'vue-style-loader!css-loader!sass-loader?indentedSyntax' | ||
} | ||
} | ||
}, { | ||
test: /\.js$/, | ||
loaders: ['babel-loader', 'eslint-loader'], | ||
exclude: /node_modules/ | ||
}] | ||
} | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.