1 | const { existsSync } = require('fs')
|
2 |
|
3 | module.exports = function() {
|
4 | if (!existsSync('config.toml') && !existsSync('config.yaml')) {
|
5 | return false
|
6 | }
|
7 |
|
8 | return {
|
9 | type: 'hugo',
|
10 | port: 8888,
|
11 | proxyPort: 1313,
|
12 | env: { ...process.env },
|
13 | command: 'hugo',
|
14 | possibleArgsArrs: [['server', '-w']],
|
15 | urlRegexp: new RegExp(`(http://)([^:]+:)${1313}(/)?`, 'g'),
|
16 | dist: 'public'
|
17 | }
|
18 | }
|