Support package.cson in Atom themes

Migrate light and dark themes to use package.cson
instead of package.json
This commit is contained in:
Kevin Sawicki
2013-02-10 15:10:48 -08:00
parent a908dd5c29
commit de6e930bad
5 changed files with 25 additions and 30 deletions

View File

@@ -11,8 +11,7 @@ class AtomTheme extends Theme
if /\.css$/.test(@path)
@loadStylesheet @path
else
json = fs.read(fs.join(@path, "package.json"))
for stylesheetName in JSON.parse(json).stylesheets
stylesheetPath = fs.join(@path, stylesheetName)
@loadStylesheet stylesheetPath
metadataPath = fs.resolveExtension(fs.join(@path, 'package'), ['cson', 'json'])
stylesheetNames = fs.readObject(metadataPath).stylesheets
@loadStylesheet(fs.join(@path, name)) for name in stylesheetNames
super