Skip to content

Loading…

Added handlebars-source gemspec #443

Merged
merged 1 commit into from

2 participants

@machty

Added a .gemspec for a lightweight wrapper around specific versions of Handlebars.js. This'll go a long way toward resolving the ruby-js dependencies between HB precompilation libraries.

require 'handlebars/source'
File.read Handlebars::Source.bundled_path
File.read Handlebars::Source.runtime_bundled_path
@wycats wycats merged commit 835496f into wycats:master

1 check passed

Details default The Travis build passed
@machty machty deleted the machty:gemified branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 20, 2013
  1. @machty
Showing with 32 additions and 0 deletions.
  1. +21 −0 handlebars-source.gemspec
  2. +11 −0 lib/handlebars/source.rb
View
21 handlebars-source.gemspec
@@ -0,0 +1,21 @@
+# -*- encoding: utf-8 -*-
+require 'json'
+
+package = JSON.parse(File.read('package.json'))
+
+Gem::Specification.new do |gem|
+ gem.name = "handlebars-source"
+ gem.authors = ["Yehuda Katz"]
+ gem.email = ["wycats@gmail.com"]
+ gem.date = Time.now.strftime("%Y-%m-%d")
+ gem.description = %q{Handlebars.js source code wrapper for (pre)compilation gems.}
+ gem.summary = %q{Handlebars.js source code wrapper}
+ gem.homepage = "https://github.com/wycats/handlebars.js/"
+ gem.version = package["version"]
+
+ gem.files = [
+ 'dist/handlebars.js',
+ 'dist/handlebars.runtime.js',
+ 'lib/handlebars/source.rb'
+ ]
+end
View
11 lib/handlebars/source.rb
@@ -0,0 +1,11 @@
+module Handlebars
+ module Source
+ def self.bundled_path
+ File.expand_path("../../../dist/handlebars.js", __FILE__)
+ end
+
+ def self.runtime_bundled_path
+ File.expand_path("../../../dist/handlebars.runtime.js", __FILE__)
+ end
+ end
+end
Something went wrong with that request. Please try again.