From 82bfd83da1eb192b3a4bf426f9a416040cda4274 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki & Nathan Sobo Date: Tue, 12 Mar 2013 12:37:51 -0700 Subject: [PATCH] Require task shell path in blob snippet --- src/stdlib/task.coffee | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/stdlib/task.coffee b/src/stdlib/task.coffee index b46e2c7f8..764caeaf5 100644 --- a/src/stdlib/task.coffee +++ b/src/stdlib/task.coffee @@ -12,11 +12,7 @@ class Task throw new Error("Task already started") if @worker? taskShellPath = fs.resolveOnLoadPath('task-shell', ['js', 'coffee']) - contents = fs.read(taskShellPath) - if fs.extension(taskShellPath) is '.coffee' - CoffeeScript = require 'coffee-script' - contents = CoffeeScript.compile(contents, filename: taskShellPath) - blob = new Blob([contents], type: 'text/javascript') + blob = new Blob(["require('coffee-script'); require('#{taskShellPath}');"], type: 'text/javascript') @worker = new Worker(URL.createObjectURL(blob)) @worker.onmessage = ({data}) => if @aborted