diff --git a/bower.json b/components/bower.json similarity index 77% rename from bower.json rename to components/bower.json index 4b86a80a..c34fc3fe 100644 --- a/bower.json +++ b/components/bower.json @@ -1,7 +1,7 @@ { "name": "handlebars.js", "version": "1.0.0", - "main": "dist/handlebars.js", + "main": "handlebars.js", "ignore": [ "node_modules", "components" diff --git a/components/component.json b/components/component.json new file mode 100644 index 00000000..f74c8396 --- /dev/null +++ b/components/component.json @@ -0,0 +1,9 @@ +{ + "name": "handlebars", + "repo": "components/handlebars.js", + "version": "1.0.0", + "main": "handlebars.js", + "scripts": [ + "handlebars.js" + ] +} diff --git a/components/composer.json b/components/composer.json new file mode 100644 index 00000000..c5dc4271 --- /dev/null +++ b/components/composer.json @@ -0,0 +1,35 @@ +{ + "name": "components/handlebars.js", + "description": "Handlebars.js and Mustache are both logicless templating languages that keep the view and the code separated like we all know they should be.", + "homepage": "http://handlebarsjs.com", + "license": "MIT", + "type": "component", + "keywords": [ + "handlebars", + "mustache", + "html" + ], + "authors": [ + { + "name": "Chris Wanstrath", + "homepage": "http://chriswanstrath.com" + } + ], + "require": { + "robloach/component-installer": "*" + }, + "extra": { + "component": { + "name": "handlebars", + "scripts": [ + "handlebars.js" + ], + "files": [ + "handlebars.runtime.js" + ], + "shim": { + "exports": "Handlebars" + } + } + } +} diff --git a/handlebars-source.gemspec b/components/handlebars-source.gemspec similarity index 79% rename from handlebars-source.gemspec rename to components/handlebars-source.gemspec index 514e2b1e..01ca1d1e 100644 --- a/handlebars-source.gemspec +++ b/components/handlebars-source.gemspec @@ -1,7 +1,7 @@ # -*- encoding: utf-8 -*- require 'json' -package = JSON.parse(File.read('package.json')) +package = JSON.parse(File.read('bower.json')) Gem::Specification.new do |gem| gem.name = "handlebars-source" @@ -14,8 +14,8 @@ Gem::Specification.new do |gem| gem.version = package["version"] gem.files = [ - 'dist/handlebars.js', - 'dist/handlebars.runtime.js', - 'lib/handlebars/source.rb' + 'handlebars.js', + 'handlebars.runtime.js', + 'source.rb' ] end diff --git a/handlebars.js.nuspec b/components/handlebars.js.nuspec similarity index 90% rename from handlebars.js.nuspec rename to components/handlebars.js.nuspec index 4515f2eb..37f2c4cd 100644 --- a/handlebars.js.nuspec +++ b/components/handlebars.js.nuspec @@ -12,6 +12,6 @@ handlebars mustache template html - + diff --git a/components/source.rb b/components/source.rb new file mode 100644 index 00000000..ec4caac9 --- /dev/null +++ b/components/source.rb @@ -0,0 +1,11 @@ +module Handlebars + module Source + def self.bundled_path + File.expand_path("handlebars.js", __FILE__) + end + + def self.runtime_bundled_path + File.expand_path("handlebars.runtime.js", __FILE__) + end + end +end diff --git a/lib/handlebars/source.rb b/lib/handlebars/source.rb deleted file mode 100644 index f576885a..00000000 --- a/lib/handlebars/source.rb +++ /dev/null @@ -1,11 +0,0 @@ -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 diff --git a/tasks/release.js b/tasks/release.js index 636670e1..e7b0f191 100644 --- a/tasks/release.js +++ b/tasks/release.js @@ -28,10 +28,9 @@ module.exports = function(grunt) { grunt.task.run(['build', 'tag']); async.each([ - ['lib/handlebars/base.js', /Handlebars.VERSION = "(.*)";/, 'Handlebars.VERSION = "' + version + '";'], - ['package.json', /"version":.*/, '"version": "' + version + '",'], - ['bower.json', /"version":.*/, '"version": "' + version + '",'], - ['handlebars.js.nuspec', /.*<\/version>/, '' + version + ''] + ['lib/handlebars/base.js', /var VERSION = "(.*)";/, 'var VERSION = "' + version + '";'], + ['components/bower.json', /"version":.*/, '"version": "' + version + '",'], + ['components/handlebars.js.nuspec', /.*<\/version>/, '' + version + ''] ], function(args, callback) { replace.apply(undefined, args);