mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Support CSON config file
Use ~/.atom/config.cson as the new default when no config file exists. ~/.atom/config.json is still the default if they both exist.
This commit is contained in:
@@ -188,6 +188,14 @@ module.exports =
|
||||
else
|
||||
JSON.parse(contents)
|
||||
|
||||
writeObject: (path, object) ->
|
||||
if @extension(path) is '.cson'
|
||||
CSON = require 'cson'
|
||||
content = CSON.stringify(object)
|
||||
else
|
||||
content = JSON.stringify(object, undefined, 2)
|
||||
@write(path, "#{content}\n")
|
||||
|
||||
readPlist: (path) ->
|
||||
plist = require 'plist'
|
||||
object = null
|
||||
|
||||
Reference in New Issue
Block a user