mirror of
https://github.com/atom/atom.git
synced 2026-01-23 13:58:08 -05:00
Merge branch 'master' of github.com:github/atom
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user