add more data passed through with projectSettings

This commit is contained in:
Philip Weiss
2018-02-24 17:50:18 -08:00
parent 9eee256396
commit 1483c0c96d
6 changed files with 23 additions and 11 deletions

View File

@@ -138,14 +138,17 @@ module.exports = function parseCommandLine (processArgs) {
devMode = true
}
let projectSettings
let projectSettings = {}
if (atomProject) {
const config = readProjectSettingsSync(atomProject, executedFrom)
const paths = config.paths
projectSettings = config.config
const contents = readProjectSettingsSync(atomProject, executedFrom)
const paths = contents.paths
const config = contents.config
const originPath = atomProject
if (paths != null) {
pathsToOpen = pathsToOpen.concat(paths)
}
projectSettings = { originPath, paths, config }
}
if (devMode) {
@@ -198,7 +201,7 @@ const readProjectSettingsSync = (filepath, executedFrom) => {
try {
const readPath = path.isAbsolute(filepath) ? filepath : path.join(executedFrom, filepath)
const contents = CSON.readFileSync(readPath)
if (contents.paths || content.config) {
if (contents.paths || contents.config) {
return contents
}