Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make rake produce valid javascript file #12

Merged
merged 1 commit into from
Nov 30, 2011
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module SproutCore
module Compiler
class Entry
def body
"\n(function(exports) {\n#{@raw_body}\n})({})\n"
"\n(function(exports) {\n#{@raw_body}\n})({});\n"
end
end
end
Expand All @@ -32,12 +32,11 @@ def uglify(file)
"#{LICENSE}\n#{uglified}"
end

SproutCore::Compiler.intermediate = "tmp/intermediate"
SproutCore::Compiler.output = "tmp/static"
SproutCore::Compiler.intermediate = "tmp/sproutcore-statechart"

def compile_statechart_task
SproutCore::Compiler.intermediate = "tmp/sproutcore-statechart"
js_tasks = SproutCore::Compiler::Preprocessors::JavaScriptTask.with_input "lib/**/*.js", "."
js_tasks = SproutCore::Compiler::Preprocessors::JavaScriptTask.with_input "sproutcore-statechart/lib/**/*.js", ".."
SproutCore::Compiler::CombineTask.with_tasks js_tasks, "#{SproutCore::Compiler.intermediate}/sproutcore-statechart"
end

Expand Down
4 changes: 2 additions & 2 deletions lib/ext/function.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ if (SC.EXTEND_PROTOTYPES) {
var args = Array.prototype.slice.call(arguments);
args.unshift(this);
return SC.handleActions.apply(SC, args);
},
};

/**
Extends the JS Function object with the stateObserves method that will
Expand Down Expand Up @@ -121,5 +121,5 @@ if (SC.EXTEND_PROTOTYPES) {
var args = Array.prototype.slice.call(arguments);
args.unshift(this);
return SC.stateObserves.apply(SC, args);
}
};
}