mirror of
https://github.com/atom/atom.git
synced 2026-01-23 13:58:08 -05:00
Pre-resolve paths used in task bootstrap
This commit is contained in:
@@ -43,14 +43,17 @@ class Task
|
||||
# The path to the Coffeescript/Javascript file that exports a single
|
||||
# function to execute.
|
||||
constructor: (taskPath) ->
|
||||
coffeeScriptPath = require.resolve('coffee-script')
|
||||
coffeeCachePath = require.resolve('./coffee-cache')
|
||||
taskBootstrapPath = require.resolve('./task-bootstrap')
|
||||
bootstrap = """
|
||||
require('coffee-script');
|
||||
require('coffee-cache');
|
||||
require('#{coffeeScriptPath}');
|
||||
require('#{coffeeCachePath}');
|
||||
Object.defineProperty(require.extensions, '.coffee', {
|
||||
writable: false,
|
||||
value: require.extensions['.coffee']
|
||||
});
|
||||
require('task-bootstrap');
|
||||
require('#{taskBootstrapPath}');
|
||||
"""
|
||||
|
||||
taskPath = require.resolve(taskPath)
|
||||
|
||||
Reference in New Issue
Block a user