mirror of
https://github.com/atom/atom.git
synced 2026-01-23 05:48:10 -05:00
Add getPath() and getLoadedStylesheetPaths()
This commit is contained in:
@@ -62,9 +62,9 @@ describe "Theme", ->
|
||||
theme.deactivate()
|
||||
|
||||
it "reloads without readding to the stylesheets list", ->
|
||||
expect(theme.stylesheets.length).toBe 3
|
||||
theme.loadStylesheet(theme.stylesheets[0])
|
||||
expect(theme.stylesheets.length).toBe 3
|
||||
expect(theme.getLoadedStylesheetPaths().length).toBe 3
|
||||
theme.loadStylesheet(theme.getLoadedStylesheetPaths()[0])
|
||||
expect(theme.getLoadedStylesheetPaths().length).toBe 3
|
||||
|
||||
describe "events", ->
|
||||
beforeEach ->
|
||||
|
||||
@@ -26,6 +26,15 @@ class Theme
|
||||
|
||||
@load()
|
||||
|
||||
getPath: ->
|
||||
@stylesheetPath
|
||||
|
||||
getLoadedStylesheetPaths: ->
|
||||
_.clone(@stylesheets)
|
||||
|
||||
isFile: ->
|
||||
path.extname(@stylesheetPath) in ['.css', '.less']
|
||||
|
||||
# Loads the stylesheets found in a `package.cson` file.
|
||||
load: ->
|
||||
if @isFile()
|
||||
|
||||
Reference in New Issue
Block a user