Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

Commit

Permalink
Add inline CSS when writing a new stylesheet fails
Browse files Browse the repository at this point in the history
  • Loading branch information
notnotdrew committed Mar 27, 2017
1 parent b90bb73 commit d6f1f3b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions lib/atom-helper.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,6 @@ module.exports =
pkg = atom.packages.getActivePackage(packageName())
pkg.reloadStylesheets()

addStylesheet: (css) ->
atom.styles.addStyleSheet(css)

3 changes: 2 additions & 1 deletion lib/colors.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ module.exports = setTerminalColors = ->
file = path.join(__dirname, '..', 'styles', 'terminal-colors.css')
fs.writeFile file, css, (err) ->
if err?
console.warn 'unable to write colors:', err
console.warn 'unable to write colors to file:', err
atomHelper.addStylesheet(css)

atomHelper.reloadStylesheets()

0 comments on commit d6f1f3b

Please sign in to comment.