mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-01-20 14:19:59 -06:00
16 lines
348 B
JavaScript
16 lines
348 B
JavaScript
const fs = require('fs')
|
|
const path = require('path')
|
|
|
|
exports.xdgConfigPath = (file) => {
|
|
const xdgConfigHome = process.env.XDG_CONFIG_HOME
|
|
if (xdgConfigHome) {
|
|
const rcDir = path.join(xdgConfigHome, 'vue')
|
|
if (!fs.existsSync(rcDir)) {
|
|
fs.mkdirSync(rcDir, 0o700)
|
|
}
|
|
return path.join(rcDir, file)
|
|
}
|
|
|
|
return undefined
|
|
}
|