-
Notifications
You must be signed in to change notification settings - Fork 9
/
picidae.config.js
59 lines (55 loc) · 1.67 KB
/
picidae.config.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
/**
* @file: picidae.config.js
* @author: Cuttle Cong
* @date: 2017/11/23
* @description:
*/
var nps = require('path')
module.exports = {
docRoot: './doc',
theme: './theme',
// publicPath: '/eux-blog/',
// @todo
host: 'http://eux.baidu.com/',
verbose: true,
webpackConfigUpdater: function (config) {
// config.module.loaders[2].include = [/\/node_modules\/picidae\//, nps.join(__dirname, '..')]
config.module.loaders[2].exclude = [
function (name) {
return !/\/picidae-(plugin|transformer|theme|commander)/.test(name)
&& !/(node_modules|bower_components)\/picidae/.test(name)
&& /(node_modules|bower_components)/.test(name)
},
/\/node_modules\/(core-js|babel-runtime)\//
]
return config
},
distRoot: './public',
// templateData(gift) {
// console.log('templateData', gift)
// return Promise.resolve({
// gift
// })
// }
port: 10000,
transformers: [
// 'picidae-transformer-medium-image?' + JSON.stringify({
// sizeOptions: {
// debug: false
// },
// progressive: {
// sizeOptions: { debug: true, devEnable: false },
// progressImageUrlGetter: function(url) {
// var obj = require('url').parse(url)
// if (obj.hostname === 'eux-blog-static.bj.bcebos.com') {
// obj.pathname = obj.pathname += '@s_0,h_30,l_1,f_jpg,q_50'
// var newUrl = require('url').format(obj)
// return newUrl
// }
// var q = String.fromCharCode(63)
// return 'http://23.106.151.229:8000/resize/' + encodeURIComponent(url) + q + 's=0.1'
// }.toString()
// }
// })
]
}