mirror of
https://github.com/tenrok/vue-select.git
synced 2026-05-17 02:29:37 +03:00
- new dedicated development template
- separate environment for developing docs - clear out discarded couscous files - start converting docs markdown
This commit is contained in:
@@ -5,7 +5,7 @@ var projectRoot = path.resolve(__dirname, '../')
|
||||
|
||||
module.exports = {
|
||||
entry: {
|
||||
app: './src/dev.js'
|
||||
app: process.argv.indexOf('--docs') > 0 ? './docs/docs.js' : './src/dev.js',
|
||||
},
|
||||
output: {
|
||||
path: config.build.assetsRoot,
|
||||
@@ -20,6 +20,7 @@ module.exports = {
|
||||
'assets': path.resolve(__dirname, '../docs/assets'),
|
||||
'mixins': path.resolve(__dirname, '../src/mixins'),
|
||||
'components': path.resolve(__dirname, '../src/components'),
|
||||
'docs': path.resolve(__dirname, '../docs'),
|
||||
'vue$': 'vue/dist/vue.common.js',
|
||||
}
|
||||
},
|
||||
|
||||
@@ -12,7 +12,7 @@ Object.keys(baseWebpackConfig.entry).forEach(function (name) {
|
||||
|
||||
module.exports = merge(baseWebpackConfig, {
|
||||
module: {
|
||||
loaders: utils.styleLoaders()
|
||||
loaders: utils.styleLoaders().concat({ test: /\.md$/, loader: "html!markdown" })
|
||||
},
|
||||
// eval-source-map is faster for development
|
||||
devtool: '#eval-source-map',
|
||||
@@ -27,8 +27,13 @@ module.exports = merge(baseWebpackConfig, {
|
||||
// https://github.com/ampedandwired/html-webpack-plugin
|
||||
new HtmlWebpackPlugin({
|
||||
filename: 'index.html',
|
||||
template: 'dev.html',
|
||||
template: process.argv.indexOf('--docs') > 0 ? './docs/docs.html' : 'dev.html',
|
||||
inject: true
|
||||
})
|
||||
]
|
||||
],
|
||||
markdownLoader: {
|
||||
highlight: function (code) {
|
||||
return require('highlight.js').highlightAuto(code).value;
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user