mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Use fsUtils.readObject() to read theme metadata
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
fsUtils = require 'fs-utils'
|
||||
Theme = require 'theme'
|
||||
CSON = require 'cson'
|
||||
|
||||
# Internal: Represents a theme that Atom can use.
|
||||
module.exports =
|
||||
@@ -19,7 +18,7 @@ class AtomTheme extends Theme
|
||||
else
|
||||
metadataPath = fsUtils.resolveExtension(fsUtils.join(@path, 'package'), ['cson', 'json'])
|
||||
if fsUtils.isFile(metadataPath)
|
||||
stylesheetNames = CSON.readObject(metadataPath)?.stylesheets
|
||||
stylesheetNames = fsUtils.readObject(metadataPath)?.stylesheets
|
||||
if stylesheetNames
|
||||
for name in stylesheetNames
|
||||
filename = fsUtils.resolveExtension(fsUtils.join(@path, name), ['.css', '.less', ''])
|
||||
|
||||
Reference in New Issue
Block a user