Kevin Sawicki
745a3ef9f2
Use class methods to create native object shims
...
CoffeeScript 1.5 complains if a constructor has
a returns a value.
2013-02-27 13:25:10 -08:00
Kevin Sawicki
c79fca1adb
Use string interpolation for error message
2013-02-22 09:15:47 -08:00
Corey Johnson & Kevin Sawicki
e4f87d522f
Rename Task.terminate to Task.abort
2013-02-19 10:57:04 -08:00
Corey Johnson & Kevin Sawicki
7db83662b5
Only terminate worker after the worker completes work
2013-02-19 10:57:04 -08:00
Kevin Sawicki
10430842b0
Use binary icon for .woff and .DS_Store extensions
2013-02-16 09:54:20 -08:00
Corey Johnson
52d4723711
Add underscore, camelize and dasherize to underscore
2013-02-13 10:42:22 -08:00
Kevin Sawicki
1f4aedeb10
Rename isReadme to isReadmePath
2013-02-12 11:47:13 -08:00
Kevin Sawicki
9e39a382e8
DRY up checking if path is .cson or .json
2013-02-12 11:02:07 -08:00
Kevin Sawicki
133d417cad
Outdent line previously wrapped in try/catch
2013-02-11 10:33:25 -08:00
Corey Johnson & Kevin Sawicki
91ce3ce0b3
Remove retry of failed coffeescript compilation from require
2013-02-11 10:27:07 -08:00
Corey Johnson & Kevin Sawicki
c1203d48e2
Only call terminate when worker isn't null
2013-02-08 17:28:05 -08:00
Corey Johnson & Kevin Sawicki
e959c371e3
Terminate task when fuzzy finder is deactivated
...
Task no longer invokes task methods after task has
been terminated.
2013-02-08 17:28:05 -08:00
Kevin Sawicki
816ca6b8c0
Remove Native class
...
This class was only be used for two shims to the
$native object.
2013-02-05 17:22:08 -08:00
Kevin Sawicki
9011d62351
Use octicon for README files
2013-02-05 09:17:47 -08:00
Kevin Sawicki
bd88a0de15
Support CSON config file
...
Use ~/.atom/config.cson as the new default when no
config file exists.
~/.atom/config.json is still the default if they both
exist.
2013-02-04 12:38:00 -08:00
Kevin Sawicki
cd07ec841d
Add more window globals and shims in task shell
...
This allows jQuery to be successfully loaded from a web worker
since it does not have a document or window object by default.
Previously it would log about missing methods and properties.
Closes #228
2013-02-04 11:43:58 -08:00
Kevin Sawicki
0bb0863b61
Use _.indexOf instead of _.contains
...
_.indexOf supports a isSorted flag which can be used
since the extension arrays are pre-sorted.
2013-02-04 09:08:00 -08:00
Kevin Sawicki
84feaf369d
Format undefined array values as null
2013-02-04 09:08:00 -08:00
Kevin Sawicki
999bca5871
💄
2013-02-01 16:21:14 -08:00
Kevin Sawicki
69097bee50
Kill trailing newline and inline empty arrays
2013-02-01 16:20:25 -08:00
Kevin Sawicki
83b6a93684
Add initial CSON pretty printer
2013-02-01 16:15:54 -08:00
Kevin Sawicki
379a4a4d8d
Only auto-load .cson and .json keymap files
...
This now prevents files such as .DS_Store from being loaded as a
keymap where previously all paths were loaded regardless of extension.
Closes #205
2013-01-31 12:03:21 -08:00
Corey Johnson & Kevin Sawicki
8f030cd97e
Always calculate dimensions with editor on DOM
...
Closes #206
2013-01-31 10:31:13 -08:00
Kevin Sawicki
9b4d570989
Require config when task shell starts
...
Config adds to the require paths so it needs to be required
before the handler starts so that web worker handlers have the
same require semantics as the main window.
2013-01-29 10:28:58 -08:00
Kevin Sawicki
75da205b0a
Terminate worker when all snippets have been loaded
2013-01-27 22:26:45 -08:00
Kevin Sawicki
a89e1fae11
Use interpolated string when evaluating
2013-01-27 20:12:36 -08:00
Kevin Sawicki
90054d8553
Pop from split array to get last index
2013-01-27 20:09:23 -08:00
Kevin Sawicki
15a06cbdb3
DRY up how cache file path is generated
2013-01-27 18:11:07 -08:00
Kevin Sawicki & Nathan Sobo
aeb2ddac50
HACK: attempt 2nd CoffeeScript.compile when evaluating fails
...
Temporary workaround for CEF/CoffeeScript timing issue where
compiler generates invalid JavaScript.
2013-01-27 18:33:09 -07:00
Nathan Sobo
0726987896
Give Task an RPC-style interaction with its Worker
...
This commit makes all interactions between Task and Worker look
like method calls. The worker now has a global `callTaskMethod`
function that it can use to call methods on the Task object. And the
Task can use `callWorkerMethod` to call methods on a global `handler`
object in the worker. The worker's initial `handler` actually contains
the `start` method, which the Task initially calls to kick things off.
Then the global `handler` gets replaced with whatever `handlerPath`
is specified by the Task. The worker then calls `workerStarted` on its
parent Task object.
This commit also gets rid of the `onProgress` method with the reply
semantics, favoring a more explicit interaction. When `snippetsLoaded`
finishes adding the snippet data, we call `loadNextPackageSnippets`
explicitly rather than returning a reply message.
2013-01-24 17:22:50 -08:00
Kevin Sawicki
69c9ed3feb
Use self instead of hacky eval
2013-01-24 17:22:50 -08:00
Kevin Sawicki
3dd11c6c0f
Set type to log for console.log forwarding
2013-01-24 17:22:50 -08:00
Kevin Sawicki
2393bd0e9e
Create task shell that bootstraps worker
2013-01-24 17:22:50 -08:00
Kevin Sawicki
9ab730b3d0
Load snippets in a web worker
...
A single web worker is now used to load
snippets one bundle at a time.
2013-01-24 17:22:50 -08:00
Corey Johnson & Nathan Sobo
d4b5c8beac
Don't make OnigScanner and OnigRegExp be window globals
2013-01-24 17:22:49 -08:00
Corey Johnson & Nathan Sobo
e5c96c7077
Convert OnigScanner to a context binding
2013-01-24 17:22:49 -08:00
Nathan Sobo
2946ba7b9a
Convert OnigRegExp from a v8 extension to a window binding
2013-01-24 17:22:49 -08:00
Corey Johnson & Nathan Sobo
74d7d48dcc
Don't make GitRepository a window global
2013-01-24 17:22:49 -08:00
Corey Johnson & Nathan Sobo
1e6e6c4411
Convert git v8 extension to a context binding
2013-01-24 17:22:49 -08:00
Jon Rohan
5969e79ebc
allow leading dot in extension names in fs resolve
2013-01-22 12:41:33 -08:00
Kevin Sawicki
43d0c8a2a1
Perform extension test once
...
This does not need to be computed on each path since
file isn't changing between paths visited
2013-01-18 09:14:17 -08:00
Kevin Sawicki
a7f03f4aeb
Use __moduleExists from require
2013-01-18 09:08:34 -08:00
Kevin Sawicki
f29c3a0836
Check if module path is already loaded before doing fs operations
...
resolve now checks the existence of a module already loaded at the
given path before checking if the file exists on disk.
This removes the need for many redundant fs.exists and fs.isFile
calls for already loaded modules.
This speeds up package loading since most packages have a common
set of requires that were doing needless fs operations for each
searched path when the module was already in the cache at that
path.
2013-01-18 08:54:59 -08:00
Kevin Sawicki
78d855e05e
Add .tiff to image extensions
2013-01-16 09:11:40 -08:00
Kevin Sawicki
28d4c3749f
Use octicon for command panel prompt
2013-01-14 09:32:04 -08:00
Kevin Sawicki & Nathan Sobo
ac3c059246
Extract _.setValueForKeyPath to underscore extensions
2013-01-10 18:02:55 -07:00
Kevin Sawicki & Nathan Sobo
3af97c4e38
Add Event.currentTargetView() and Event.targetView()
2013-01-10 11:41:07 -08:00
Nathan Sobo
2c4da1b8dd
Merge branch 'snippets' into dev
...
Conflicts:
src/app/package.coffee
src/packages/snippets/src/snippets.coffee
2013-01-09 13:10:11 -07:00
Nathan Sobo
e33f93b40c
Load snippets from TextMate bundles
...
There's still a bunch of holes in this. TextMate snippets have features
that we don't support yet. But the basic ones should now work.
2013-01-09 11:43:11 -07:00
Kevin Sawicki
fee1e7bc8b
Escape ext in RegExp from fs.base
2013-01-08 13:31:37 -08:00