Commit Graph

21924 Commits

Author SHA1 Message Date
Kevin Sawicki
a1c418e995 ⬆️ Upgrade to apm 0.103 2014-10-15 15:09:11 -07:00
Kevin Sawicki
f07f096f56 Use Range class that memoizes 2014-10-15 14:47:24 -07:00
Ben Ogle
62c1972c95 isDefault supports scoped settings 2014-10-15 14:44:16 -07:00
Nathan Sobo
314c525d2d Assign properties in addition to attributes for convenience 2014-10-15 15:14:13 -06:00
Nathan Sobo
04b3eef768 Fix theme-manager-specs 2014-10-15 15:14:13 -06:00
Nathan Sobo
506753a535 Subscribe to <atom-styles> element to shim events in ThemeManager
This is better than subscribing to atom.styles because the events it
emits contain the *actual* style elements we insert into the DOM.
2014-10-15 15:14:13 -06:00
Nathan Sobo
a8b9e1b790 Handle style element updates in StylesElement 2014-10-15 15:14:13 -06:00
Nathan Sobo
be51ccf786 Add StylesElement::onDidAdd/RemoveStyleElement 2014-10-15 15:14:13 -06:00
Nathan Sobo
65e077abd1 Use StyleManager and StylesElement to manage all stylesheet elements
For now, loading remains in the theme manager, but all application of
stylesheets is routed through atom.styles.
2014-10-15 15:14:13 -06:00
Nathan Sobo
79598aaae9 Add StyleElement
This will be used to handle stylesheet rendering when we move management
of loading stylesheets to the StyleManager instead of the theme manager.
This sets us up for being able to render specific stylesheets in shadow
roots in addition to just having global stylesheets.
2014-10-15 15:14:13 -06:00
Nathan Sobo
62a43c6fb9 Revise StyleManager API 2014-10-15 15:14:12 -06:00
Nathan Sobo
1fe1147901 Add group parameter to StyleManager::addStyleSheet
This can be used to sequence style elements at the correct location in
the cascade even if they are loaded later than elements in a subsequent
group.
2014-10-15 15:14:12 -06:00
Nathan Sobo
1c97dcd195 Add sourcePath parameter to StyleManager::addStyleSheet 2014-10-15 15:14:12 -06:00
Nathan Sobo
d3371dbcd2 Start on StyleManager
This will take over raw stylesheet management from the theme manager
now that it’s becoming more complex with the need to target specific
host elements. Instead of actually adding nodes to the head of the
document, it will instead simply manage a set of stylesheets we want to
apply and leave actual DOM manipulation to <atom-styles> custom elements
that can render the set of active stylesheets in the appropriate
locations.
2014-10-15 15:14:12 -06:00
Kevin Sawicki
b2b4860983 Merge pull request #3761 from atom/ks-require-cache
Cache requires across installed packages
2014-10-15 14:00:10 -07:00
Kevin Sawicki
57fc3deaed Assert that resolved atom shell module paths exist 2014-10-15 13:12:42 -07:00
Kevin Sawicki
677949d61c Check that all builtins resolve without hitting fs 2014-10-15 13:09:47 -07:00
Kevin Sawicki
e09d7159bc Add spec for no compatible module version available 2014-10-15 13:09:47 -07:00
Kevin Sawicki
e02af51a04 🐎 Extend range to memoize matched versions 2014-10-15 13:09:47 -07:00
Kevin Sawicki
d2c7a2caca Return early when cache to add is missing 2014-10-15 13:09:47 -07:00
Kevin Sawicki
739a629552 💄 2014-10-15 13:09:47 -07:00
Kevin Sawicki
88f0183352 Remove unneeded quotes 2014-10-15 13:09:47 -07:00
Kevin Sawicki
7f01a163e5 💄 2014-10-15 13:09:47 -07:00
Kevin Sawicki
fc44662ba3 Add spec for resolving compatible module paths 2014-10-15 13:09:47 -07:00
Kevin Sawicki
5052aaca95 Don't leave empty paths with a trailing slash 2014-10-15 13:09:46 -07:00
Kevin Sawicki
826681b6c2 Add relative path cache spec 2014-10-15 13:09:46 -07:00
Kevin Sawicki
8334bba484 Add initial ModuleCache spec 2014-10-15 13:09:46 -07:00
Kevin Sawicki
a0ae526017 Check candidates after ranges
This way builtins are checked for correctly when the
range isn’t found
2014-10-15 13:09:46 -07:00
Kevin Sawicki
6a6c7b1852 Calculate load time in index.js
Do it previously in window-bootstrap caused several things to not be
included such as requiring coffee script and atom shell modules.

Now it is a much more accurate representation of on load time.
2014-10-15 13:09:46 -07:00
Kevin Sawicki
42040f8a9d Return early when no candidates exist 2014-10-15 13:09:46 -07:00
Kevin Sawicki
9d1db0f3de Remove unneeded trailing slash check
Package names don’t have these anyway and file paths
won’t be ending with them.
2014-10-15 13:09:46 -07:00
Kevin Sawicki
f0b922f643 Use String::startsWith 2014-10-15 13:09:46 -07:00
Kevin Sawicki
bb92b8697d Add isCorePath helper 2014-10-15 13:09:46 -07:00
Kevin Sawicki
4c17c9eae6 fs-plust -> fs-plus 2014-10-15 13:09:46 -07:00
Kevin Sawicki
289f17b119 Require coffee before module cache in dev mode 2014-10-15 13:09:46 -07:00
Kevin Sawicki
dfd7bcae7f Use process.resourcesPath to find Atom shell root 2014-10-15 13:09:46 -07:00
Kevin Sawicki
0cfd37acd0 Special case reactionary in cache 2014-10-15 13:09:45 -07:00
Kevin Sawicki
105fc302ea Upgrade to text-buffer@3.2.9 2014-10-15 13:09:45 -07:00
Kevin Sawicki
f4ddc05b9c Remove call to removed function 2014-10-15 13:09:45 -07:00
Kevin Sawicki
948f96dd6f Only load fs-plus when creating a cache 2014-10-15 13:09:45 -07:00
Kevin Sawicki
db627f5cde 🐎 Join paths manually
path.join calls path.normalize and with the number of paths
being pushed through the cache it is faster to require them
manually since they are already normalized
2014-10-15 13:09:45 -07:00
Kevin Sawicki
a6866656b7 Inline isAbsolute method
This allows fs-plus to be required through the cache
2014-10-15 13:09:45 -07:00
Kevin Sawicki
40c5289e2b Defer requires until the cache is populated 2014-10-15 13:09:45 -07:00
Kevin Sawicki
7dffc58c5b Use Module's filename instead of id 2014-10-15 13:09:45 -07:00
Kevin Sawicki
67d430d100 Add crash-reporter to cache 2014-10-15 13:09:45 -07:00
Kevin Sawicki
d745b9ef5f Register module cache as early as possible 2014-10-15 13:09:45 -07:00
Kevin Sawicki
b9d89cbf5d Inline valid extensions to check for 2014-10-15 13:09:45 -07:00
Kevin Sawicki
934c0720d8 Require ipc when needed 2014-10-15 13:09:44 -07:00
Kevin Sawicki
06ac206707 Add clipboard to cache 2014-10-15 13:09:44 -07:00
Kevin Sawicki
6e1bdbbed7 Verify that file path is absolute or relative 2014-10-15 13:09:44 -07:00