mirror of
https://github.com/atom/atom.git
synced 2026-02-15 17:15:24 -05:00
Allow packages to have stylesheet manifests
This commit is contained in:
committed by
Nathan Sobo
parent
c8804359c9
commit
8c1f5658be
@@ -69,9 +69,14 @@ class AtomPackage extends Package
|
||||
|
||||
loadStylesheets: ->
|
||||
@stylesheets = []
|
||||
@stylesheets.push([path, loadStylesheet(path)]) for path in @getStylesheetPaths()
|
||||
|
||||
getStylesheetPaths: ->
|
||||
stylesheetDirPath = fsUtils.join(@path, 'stylesheets')
|
||||
for stylesheetPath in fsUtils.list(stylesheetDirPath, ['css', 'less']) ? []
|
||||
@stylesheets.push([stylesheetPath, loadStylesheet(stylesheetPath)])
|
||||
if @metadata.stylesheets
|
||||
@metadata.stylesheets.map (name) -> fsUtils.resolve(stylesheetDirPath, name, ['css', 'less', ''])
|
||||
else
|
||||
fsUtils.list(stylesheetDirPath, ['css', 'less']) ? []
|
||||
|
||||
loadGrammars: ->
|
||||
@grammars = []
|
||||
|
||||
Reference in New Issue
Block a user