-
Notifications
You must be signed in to change notification settings - Fork 138
/
cooking.conf.js
51 lines (46 loc) · 1.07 KB
/
cooking.conf.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
var path = require('path');
var cooking = require('cooking');
cooking.set({
entry: './src/main.js',
dist: './dist',
template: './src/index.tpl',
devServer: {
port: 8075,
publicPath: '/',
hostname: require('my-local-ip')()
},
hash: true,
publicPath: '/docs/',
extractCSS: true,
postcss: [
require('postcss-salad')
],
extends: ['vue', 'lint'],
alias: {
'src': path.join(__dirname, 'src')
},
externals: process.env.NODE_ENV === 'production' ? {
'vue-router': 'VueRouter',
'vue': 'Vue'
}: {}
});
cooking.add('vue.autoprefixer', false);
cooking.add('vue.postcss', [
require('postcss-salad')
]);
cooking.add('loader.md', {
test: /\.md$/,
loader: 'vue-markdown-loader'
});
cooking.add('vueMarkdown', {
preprocess: function (MarkdownIt, Source) {
MarkdownIt.renderer.rules.table_open = function () {
return '<div class="table-container"><table class="table">';
};
MarkdownIt.renderer.rules.table_close = function () {
return '</table></div>';
};
return Source;
}
});
module.exports = cooking.resolve();