-
Notifications
You must be signed in to change notification settings - Fork 73
/
properties.js
74 lines (71 loc) · 2.15 KB
/
properties.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
'use strict';
module.exports = {
production: {
build: {
domain: 'beg-in.github.io',
main: './site/index.js',
cdn: 'https://beg-in.github.io/vue-babylonjs/',
root: 'https://beg-in.github.io/vue-babylonjs/',
title: 'Vue-BabylonJS Documentation site',
color: '#42b883',
dist: 'docs',
config() {
let prism = require('prismjs');
let loadLanguages = require('prismjs/components/index');
let basic = require('begin-build/config/basic');
let vue = require('begin-build/config/vue');
let path = require('path');
return Object.assign({}, basic, {
local() {
loadLanguages(['pug', 'bash']);
let hl = (text, { lang = 'markup' } = {}) => {
if (text[0] === '\n') {
text = text.substring(1);
}
return `<code lang="${lang}">${prism.highlight(text, prism.languages[lang], lang)}</code>`;
};
return {
module: {
rules: {
$build: Array,
scripts: {
exclude: /node_modules\/(?!(begin-|@babylonjs))/,
},
markup: {
use: {
$build: Array,
pug: {
options: {
filters: {
hl,
},
data: {
hl,
},
},
},
},
},
shaders: {
test: /\.(glsl|frag|vert)$/,
use: {
$build: Array,
raw: 'raw-loader',
glsl: 'glslify-loader',
},
},
},
},
resolve: {
alias: {
'vue-babylonjs$': path.join(__dirname, 'src/index.js'),
},
},
};
},
vue,
});
},
},
},
};