Browse files

Rename "vm" to "runtime" for clarity

  • Loading branch information...
1 parent 163a92e commit 757d5250dcd7cd8a979b0c5d92f2a1d24f12e663 Yehuda Katz committed Dec 27, 2011
Showing with 32 additions and 32 deletions.
  1. +28 −28 Rakefile
  2. +1 −1 lib/handlebars.js
  3. +1 −1 lib/handlebars/{vm.js → runtime.js}
  4. +2 −2 spec/spec_helper.rb
View
56 Rakefile
@@ -38,11 +38,11 @@ def remove_exports(string)
match ? match[1] : string
end
-minimal_deps = %w(base compiler/parser compiler/base compiler/ast utils compiler/compiler vm).map do |file|
+minimal_deps = %w(base compiler/parser compiler/base compiler/ast utils compiler/compiler runtime).map do |file|
"lib/handlebars/#{file}.js"
end
-vm_deps = %w(base utils vm).map do |file|
+runtime_deps = %w(base utils runtime).map do |file|
"lib/handlebars/#{file}.js"
end
@@ -70,47 +70,47 @@ file "dist/handlebars.js" => minimal_deps do |task|
build_for_task(task)
end
-file "dist/handlebars.vm.js" => vm_deps do |task|
+file "dist/handlebars.runtime.js" => runtime_deps do |task|
build_for_task(task)
end
task :build => [:compile, "dist/handlebars.js"]
-task :vm => [:compile, "dist/handlebars.vm.js"]
+task :runtime => [:compile, "dist/handlebars.runtime.js"]
-desc "build the build and vm version of handlebars"
-task :release => [:build, :vm]
+desc "build the build and runtime version of handlebars"
+task :release => [:build, :runtime]
directory "vendor"
desc "benchmark against dust.js and mustache.js"
task :bench => "vendor" do
require "open-uri"
- File.open("vendor/mustache.js", "w") do |file|
- file.puts open("https://github.com/janl/mustache.js/raw/master/mustache.js").read
- file.puts "module.exports = Mustache;"
- end
+ #File.open("vendor/mustache.js", "w") do |file|
+ #file.puts open("https://github.com/janl/mustache.js/raw/master/mustache.js").read
+ #file.puts "module.exports = Mustache;"
+ #end
File.open("vendor/benchmark.js", "w") do |file|
- file.puts open("https://github.com/mathiasbynens/benchmark.js/raw/master/benchmark.js").read
+ file.puts open("https://raw.github.com/bestiejs/benchmark.js/master/benchmark.js").read
end
- if File.directory?("vendor/dustjs")
- system "cd vendor/dustjs && git pull"
- else
- system "git clone git://github.com/akdubya/dustjs.git vendor/dustjs"
- end
-
- if File.directory?("vendor/coffee")
- system "cd vendor/coffee && git pull"
- else
- system "git clone git://github.com/jashkenas/coffee-script.git vendor/coffee"
- end
-
- if File.directory?("vendor/eco")
- system "cd vendor/eco && git pull && npm update"
- else
- system "git clone git://github.com/sstephenson/eco.git vendor/eco && cd vendor/eco && npm update"
- end
+ #if File.directory?("vendor/dustjs")
+ #system "cd vendor/dustjs && git pull"
+ #else
+ #system "git clone git://github.com/akdubya/dustjs.git vendor/dustjs"
+ #end
+
+ #if File.directory?("vendor/coffee")
+ #system "cd vendor/coffee && git pull"
+ #else
+ #system "git clone git://github.com/jashkenas/coffee-script.git vendor/coffee"
+ #end
+
+ #if File.directory?("vendor/eco")
+ #system "cd vendor/eco && git pull && npm update"
+ #else
+ #system "git clone git://github.com/sstephenson/eco.git vendor/eco && cd vendor/eco && npm update"
+ #end
system "node bench/handlebars.js"
end
View
2 lib/handlebars.js
@@ -6,7 +6,7 @@ module.exports = Handlebars;
require("./handlebars/utils");
require("./handlebars/compiler");
-require("./handlebars/vm");
+require("./handlebars/runtime");
// BEGIN(BROWSER)
View
2 lib/handlebars/vm.js → lib/handlebars/runtime.js
@@ -54,7 +54,7 @@ Handlebars.VM = {
} else if(partial instanceof Function) {
return partial(context, options);
} else if (!Handlebars.compile) {
- throw new Handlebars.Exception("The partial " + name + " could not be compiled when running in vm mode");
+ throw new Handlebars.Exception("The partial " + name + " could not be compiled when running in runtime-only mode");
} else {
partials[name] = Handlebars.compile(partial);
return partials[name](context, options);
View
4 spec/spec_helper.rb
@@ -78,7 +78,7 @@ def self.js_load(context, file)
Handlebars::Spec.js_load(context, 'lib/handlebars/base.js');
Handlebars::Spec.js_load(context, 'lib/handlebars/utils.js');
- Handlebars::Spec.js_load(context, 'lib/handlebars/vm.js');
+ Handlebars::Spec.js_load(context, 'lib/handlebars/runtime.js');
context["CompilerContext"] = {}
CompilerContext = context["CompilerContext"]
@@ -129,7 +129,7 @@ def self.js_load(context, file)
Handlebars::Spec.js_load(context, 'lib/handlebars/compiler/visitor.js');
Handlebars::Spec.js_load(context, 'lib/handlebars/compiler/printer.js');
Handlebars::Spec.js_load(context, 'lib/handlebars/compiler/compiler.js');
- Handlebars::Spec.js_load(context, 'lib/handlebars/vm.js');
+ Handlebars::Spec.js_load(context, 'lib/handlebars/runtime.js');
context["Handlebars"]["logger"]["level"] = ENV["DEBUG_JS"] ? context["Handlebars"]["logger"][ENV["DEBUG_JS"]] : 4

1 comment on commit 757d525

@hallmark

I believe you forgot a reference to "handlebars.vm.js" in the README.

Please sign in to comment.