forked from vuetifyjs/vuetify
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ecosystem-win.config.js
43 lines (39 loc) · 1.02 KB
/
ecosystem-win.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
// PM2 process file
// http://pm2.keymetrics.io/docs/usage/application-declaration/
const fs = require('fs')
const separator = process.platform === 'win32' ? ';' : ':'
const paths = process.env.PATH.split(separator).map(p => `${p}/yarn.js`)
const yarnjsPaths = [
'c:/Program Files (x86)/yarn/bin/yarn.js',
'c:/Program Files/yarn/bin/yarn.js',
].concat(paths)
const yarnjsPath = yarnjsPaths.find(fs.existsSync)
if (!yarnjsPath) {
const checkedPaths = yarnjsPaths.reduce((prev, curr) => `${prev}\n${curr}`)
throw new Error(`Yarn.js not found in any of these paths:\n${checkedPaths}`)
}
module.exports = {
apps: [
{
name: 'vuetify-dev',
script: yarnjsPath,
cwd: './packages/vuetify/',
args: 'dev',
},
{
name: 'vuetify-build',
script: yarnjsPath,
cwd: './packages/vuetify/',
args: 'watch',
env: {
NODE_ENV: 'production',
},
},
{
name: 'vuetify-docs',
script: yarnjsPath,
cwd: './packages/docs/',
args: 'dev',
},
],
}