2
0
mirror of https://github.com/tenrok/vue-select.git synced 2026-05-17 02:29:37 +03:00

fine tune build, add bower.json

This commit is contained in:
Jeff Sagal
2016-06-10 11:24:05 -07:00
7 changed files with 100 additions and 0 deletions
+32
View File
@@ -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"
]
}
+19
View File
@@ -7,6 +7,7 @@ var config = require('../config')
var ora = require('ora')
var webpack = require('webpack')
var webpackConfig = require('./webpack.prod.conf')
var umdConfig = require('./webpack.umd.conf')
console.log(
' Tip:\n' +
@@ -22,6 +23,9 @@ rm('-rf', assetsPath)
mkdir('-p', assetsPath)
cp('-R', 'static/', assetsPath)
/**
* Build the /dist/ folder (demo site)
*/
webpack(webpackConfig, function (err, stats) {
spinner.stop()
if (err) throw err
@@ -33,3 +37,18 @@ webpack(webpackConfig, function (err, stats) {
chunkModules: false
}) + '\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')
})
+32
View File
@@ -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
+4
View File
@@ -14,5 +14,9 @@ module.exports = {
env: require('./dev.env'),
port: 8080,
proxyTable: {}
},
umd: {
assetsRoot: path.resolve(__dirname, '../umd'),
assetsPublicPath: '/'
}
}
+10
View File
@@ -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