Move parser file into compiler subdir
This commit is contained in:
@@ -3,3 +3,4 @@ lib/handlebars/parser.js
|
||||
vendor
|
||||
.rvmrc
|
||||
.DS_Store
|
||||
lib/handlebars/compiler/parser.js
|
||||
@@ -1,10 +1,10 @@
|
||||
require "rubygems"
|
||||
require "bundler/setup"
|
||||
|
||||
file "lib/handlebars/parser.js" => ["src/handlebars.yy","src/handlebars.l"] do
|
||||
file "lib/handlebars/compiler/parser.js" => ["src/handlebars.yy","src/handlebars.l"] do
|
||||
if ENV['PATH'].split(':').any? {|folder| File.exists?(folder+'/jison')}
|
||||
system "jison src/handlebars.yy src/handlebars.l"
|
||||
File.open("lib/handlebars/parser.js", "w") do |file|
|
||||
File.open("lib/handlebars/compiler/parser.js", "w") do |file|
|
||||
file.puts File.read("handlebars.js") + ";"
|
||||
end
|
||||
|
||||
@@ -14,7 +14,7 @@ file "lib/handlebars/parser.js" => ["src/handlebars.yy","src/handlebars.l"] do
|
||||
end
|
||||
end
|
||||
|
||||
task :compile => "lib/handlebars/parser.js"
|
||||
task :compile => "lib/handlebars/compiler/parser.js"
|
||||
|
||||
desc "run the spec suite"
|
||||
task :spec => [:release] do
|
||||
@@ -28,11 +28,11 @@ def remove_exports(string)
|
||||
match ? match[1] : string
|
||||
end
|
||||
|
||||
minimal_deps = %w(parser base ast visitor utils compiler/compiler vm).map do |file|
|
||||
minimal_deps = %w(compiler/parser base ast visitor utils compiler/compiler vm).map do |file|
|
||||
"lib/handlebars/#{file}.js"
|
||||
end
|
||||
|
||||
debug_deps = %w(parser base ast visitor printer utils compiler/compiler vm debug).map do |file|
|
||||
debug_deps = %w(compiler/parser base ast visitor printer utils compiler/compiler vm debug).map do |file|
|
||||
"lib/handlebars/#{file}.js"
|
||||
end
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
var handlebars = require("handlebars/parser").parser;
|
||||
var handlebars = require("handlebars/compiler/parser").parser;
|
||||
|
||||
// BEGIN(BROWSER)
|
||||
var Handlebars = {};
|
||||
|
||||
+1
-1
@@ -72,7 +72,7 @@ module Handlebars
|
||||
puts
|
||||
end
|
||||
|
||||
Handlebars::Spec.js_load('lib/handlebars/parser.js')
|
||||
Handlebars::Spec.js_load('lib/handlebars/compiler/parser.js')
|
||||
Handlebars::Spec.js_load('lib/handlebars/base.js');
|
||||
Handlebars::Spec.js_load('lib/handlebars/ast.js');
|
||||
Handlebars::Spec.js_load('lib/handlebars/visitor.js');
|
||||
|
||||
Reference in New Issue
Block a user