mirror of
https://github.com/tenrok/vue-select.git
synced 2026-06-22 10:30:34 +03:00
fine tune build, add bower.json
This commit is contained in:
+32
@@ -0,0 +1,32 @@
|
|||||||
|
{
|
||||||
|
"name": "vue-select",
|
||||||
|
"description": "A native Vue.js select component that provides similar functionality to Select2/Chosen without the overhead of jQuery.",
|
||||||
|
"main": "umd/vue-select.js",
|
||||||
|
"authors": [
|
||||||
|
"Jeff Sagal <sagalbot@gmail.com>"
|
||||||
|
],
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/sagalbot/vue-select"
|
||||||
|
},
|
||||||
|
"license": "MIT",
|
||||||
|
"keywords": [
|
||||||
|
"vue.js",
|
||||||
|
"vue-select",
|
||||||
|
"select2",
|
||||||
|
"tagging"
|
||||||
|
],
|
||||||
|
"moduleType": [
|
||||||
|
"amd",
|
||||||
|
"node",
|
||||||
|
"es6"
|
||||||
|
],
|
||||||
|
"homepage": "http://sagalbot.github.io/vue-select/",
|
||||||
|
"ignore": [
|
||||||
|
"**/.*",
|
||||||
|
"node_modules",
|
||||||
|
"bower_components",
|
||||||
|
"test",
|
||||||
|
"tests"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -7,6 +7,7 @@ var config = require('../config')
|
|||||||
var ora = require('ora')
|
var ora = require('ora')
|
||||||
var webpack = require('webpack')
|
var webpack = require('webpack')
|
||||||
var webpackConfig = require('./webpack.prod.conf')
|
var webpackConfig = require('./webpack.prod.conf')
|
||||||
|
var umdConfig = require('./webpack.umd.conf')
|
||||||
|
|
||||||
console.log(
|
console.log(
|
||||||
' Tip:\n' +
|
' Tip:\n' +
|
||||||
@@ -22,6 +23,9 @@ rm('-rf', assetsPath)
|
|||||||
mkdir('-p', assetsPath)
|
mkdir('-p', assetsPath)
|
||||||
cp('-R', 'static/', assetsPath)
|
cp('-R', 'static/', assetsPath)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Build the /dist/ folder (demo site)
|
||||||
|
*/
|
||||||
webpack(webpackConfig, function (err, stats) {
|
webpack(webpackConfig, function (err, stats) {
|
||||||
spinner.stop()
|
spinner.stop()
|
||||||
if (err) throw err
|
if (err) throw err
|
||||||
@@ -33,3 +37,18 @@ webpack(webpackConfig, function (err, stats) {
|
|||||||
chunkModules: false
|
chunkModules: false
|
||||||
}) + '\n')
|
}) + '\n')
|
||||||
})
|
})
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Build the UMD module @ /umd/vue-select.js.
|
||||||
|
*/
|
||||||
|
webpack(umdConfig, function (err, stats) {
|
||||||
|
spinner.stop()
|
||||||
|
if (err) throw err
|
||||||
|
process.stdout.write(stats.toString({
|
||||||
|
colors: true,
|
||||||
|
modules: false,
|
||||||
|
children: false,
|
||||||
|
chunks: false,
|
||||||
|
chunkModules: false
|
||||||
|
}) + '\n')
|
||||||
|
})
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
const webpack = require('webpack')
|
||||||
|
const base = require('./webpack.base.conf')
|
||||||
|
const config = require('../config')
|
||||||
|
|
||||||
|
base.entry = {
|
||||||
|
lib: './src/index.js'
|
||||||
|
}
|
||||||
|
|
||||||
|
base.output = {
|
||||||
|
path: config.umd.assetsRoot,
|
||||||
|
publicPath: config.umd.assetsPublicPath,
|
||||||
|
filename: 'vue-select.js',
|
||||||
|
library: 'VueSelect',
|
||||||
|
libraryTarget: 'umd'
|
||||||
|
}
|
||||||
|
|
||||||
|
var webpackConfig = Object.assign({}, base)
|
||||||
|
|
||||||
|
webpackConfig.devtool = '#source-map'
|
||||||
|
webpackConfig.plugins = (webpackConfig.plugins || []).concat([
|
||||||
|
new webpack.DefinePlugin({
|
||||||
|
'process.env': {
|
||||||
|
NODE_ENV: '"production"'
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
new webpack.optimize.UglifyJsPlugin({
|
||||||
|
compress: { warnings: false }
|
||||||
|
}),
|
||||||
|
new webpack.optimize.OccurenceOrderPlugin(),
|
||||||
|
])
|
||||||
|
|
||||||
|
module.exports = webpackConfig
|
||||||
@@ -14,5 +14,9 @@ module.exports = {
|
|||||||
env: require('./dev.env'),
|
env: require('./dev.env'),
|
||||||
port: 8080,
|
port: 8080,
|
||||||
proxyTable: {}
|
proxyTable: {}
|
||||||
|
},
|
||||||
|
umd: {
|
||||||
|
assetsRoot: path.resolve(__dirname, '../umd'),
|
||||||
|
assetsPublicPath: '/'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
import VueSelect from './components/Select.vue'
|
||||||
|
import scroll from './mixins/pointerScroll.js'
|
||||||
|
import pointer from './mixins/typeAheadPointer.js'
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
component: VueSelect,
|
||||||
|
mixins: {
|
||||||
|
scroll, pointer
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user