mirror of
https://github.com/atom/atom.git
synced 2026-01-23 22:08:08 -05:00
move ~/.atomicity loading into plugins.coffee
This commit is contained in:
@@ -23,20 +23,6 @@ define (require, exports, module) ->
|
||||
editor.resize()
|
||||
, 50
|
||||
|
||||
if css = File.read "~/.atomicity/twilight.css"
|
||||
head = $('head')[0]
|
||||
style = document.createElement 'style'
|
||||
rules = document.createTextNode css
|
||||
style.type = 'text/css'
|
||||
style.appendChild rules
|
||||
head.appendChild style
|
||||
|
||||
_.map Dir.list("~/.atomicity/"), (path) ->
|
||||
if /\.js$/.test path
|
||||
$.getScript path
|
||||
else if /\.coffee/.test path
|
||||
eval CoffeeScript.compile File.read path
|
||||
|
||||
filename = null
|
||||
editor.getSession().on 'change', ->
|
||||
Chrome.setDirty true
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{Chrome, Dir} = require 'osx'
|
||||
{Chrome, Dir, File} = require 'osx'
|
||||
|
||||
|
||||
_.map Dir.list(Chrome.appRoot() + "/plugins"), (plugin) ->
|
||||
try
|
||||
@@ -6,3 +7,15 @@ _.map Dir.list(Chrome.appRoot() + "/plugins"), (plugin) ->
|
||||
catch e
|
||||
name = _.last plugin.split '/'
|
||||
console.error "Problem loading plugin #{name}: #{e.message}"
|
||||
|
||||
|
||||
if css = File.read "~/.atomicity/twilight.css"
|
||||
head = $('head')[0]
|
||||
style = document.createElement 'style'
|
||||
rules = document.createTextNode css
|
||||
style.type = 'text/css'
|
||||
style.appendChild rules
|
||||
head.appendChild style
|
||||
|
||||
_.map Dir.list("~/.atomicity/"), (path) ->
|
||||
require path
|
||||
|
||||
Reference in New Issue
Block a user