Merge branch 'master' of github.com:github/atom

This commit is contained in:
Nathan Sobo
2012-03-20 17:11:44 -06:00

View File

@@ -19,6 +19,7 @@ windowAdditions =
startup: (url) ->
@setUpKeymap()
@attachRootView(url)
@loadUserConfig()
$(window).on 'close', => @close()
$(window).focus()
atom.windowOpened this
@@ -45,6 +46,13 @@ windowAdditions =
@rootView = new RootView {url}
$(@rootViewParentSelector).append @rootView
loadUserConfig: (path="~/.atom") ->
absolutePath = fs.absolute(path)
try
require absolutePath if fs.exists(absolutePath)
catch error
console.error "Failed to load `#{absolutePath}`", error
requireStylesheet: (path) ->
fullPath = require.resolve(path)
content = fs.read(fullPath)