bare_coffee 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source "http://rubygems.org/"
2
+
3
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,24 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ bare_coffee (0.1.0)
5
+ sprockets (~> 2.3.1)
6
+
7
+ GEM
8
+ remote: http://rubygems.org/
9
+ specs:
10
+ hike (1.2.1)
11
+ multi_json (1.1.0)
12
+ rack (1.4.1)
13
+ sprockets (2.3.1)
14
+ hike (~> 1.2)
15
+ multi_json (~> 1.0)
16
+ rack (~> 1.0)
17
+ tilt (~> 1.1, != 1.3.0)
18
+ tilt (1.3.3)
19
+
20
+ PLATFORMS
21
+ ruby
22
+
23
+ DEPENDENCIES
24
+ bare_coffee!
data/README.md ADDED
@@ -0,0 +1,13 @@
1
+ # BareCoffee
2
+ An Extension for Sprockets to enable --bare option for CoffeeScript's compiler. Thus, it will compile file without a top-level function wrapper.
3
+
4
+ All you have to do is add this line to your Gemfile:
5
+
6
+ gem 'bare_coffee'
7
+
8
+
9
+ This will automatically register "*.coffee.bare" file extension
10
+
11
+ ### Notes
12
+
13
+ This is not highly recommended for production or anything, but this might be useful for testing, experiment, and development.
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require 'bundler/gem_tasks'
@@ -0,0 +1,16 @@
1
+ $:.unshift File.expand_path('../lib', __FILE__)
2
+
3
+ require "rubygems"
4
+ require 'bare_coffee/version'
5
+
6
+ Gem::Specification.new do |gem|
7
+ gem.name = "bare_coffee"
8
+ gem.version = BareCoffee::VERSION
9
+ gem.author = "Bryan Goines"
10
+ gem.summary = "An Extension for Sprockets to enable --bare option for CoffeeScript's compiler."
11
+ gem.description = gem.summary + " Thus, it will compile coffeescript file into javascript file without a top-level function wrapper."
12
+ gem.email = "bryann83@gmail.com"
13
+ gem.homepage = "http://github.com/bry4n/bare_coffee"
14
+ gem.files = Dir['**/*']
15
+ gem.add_dependency "sprockets", "~> 2.3.1"
16
+ end
@@ -0,0 +1,17 @@
1
+ require 'sprockets' unless defined?(Sprockets)
2
+ require 'tilt/coffee' unless defined?(Tilt::CoffeeScriptTemplate)
3
+
4
+ module BareCoffee
5
+
6
+ # An Extension for Sprockets to enable the --bare option for CoffeeScript's compilier.
7
+ # Thus, the compiler will compile the coffeescript without a top-level function wrapper.
8
+ class Template < Tilt::CoffeeScriptTemplate
9
+ def prepare
10
+ options[:bare] = true
11
+ super
12
+ end
13
+ end
14
+
15
+ end
16
+
17
+ Sprockets.register_engine '.coffee.bare', BareCoffee::Template if defined?(Sprockets)
@@ -0,0 +1,3 @@
1
+ module BareCoffee
2
+ VERSION = "0.1.0"
3
+ end
Binary file
metadata ADDED
@@ -0,0 +1,71 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: bare_coffee
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Bryan Goines
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-02-24 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: sprockets
16
+ requirement: &70354982426260 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: 2.3.1
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: *70354982426260
25
+ description: An Extension for Sprockets to enable --bare option for CoffeeScript's
26
+ compiler. Thus, it will compile coffeescript file into javascript file without a
27
+ top-level function wrapper.
28
+ email: bryann83@gmail.com
29
+ executables: []
30
+ extensions: []
31
+ extra_rdoc_files: []
32
+ files:
33
+ - bare_coffee.gemspec
34
+ - Gemfile
35
+ - Gemfile.lock
36
+ - lib/bare_coffee/version.rb
37
+ - lib/bare_coffee.rb
38
+ - pkg/bare_coffee-0.1.0.gem
39
+ - Rakefile
40
+ - README.md
41
+ homepage: http://github.com/bry4n/bare_coffee
42
+ licenses: []
43
+ post_install_message:
44
+ rdoc_options: []
45
+ require_paths:
46
+ - lib
47
+ required_ruby_version: !ruby/object:Gem::Requirement
48
+ none: false
49
+ requirements:
50
+ - - ! '>='
51
+ - !ruby/object:Gem::Version
52
+ version: '0'
53
+ segments:
54
+ - 0
55
+ hash: -1805589473318885420
56
+ required_rubygems_version: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ segments:
63
+ - 0
64
+ hash: -1805589473318885420
65
+ requirements: []
66
+ rubyforge_project:
67
+ rubygems_version: 1.8.11
68
+ signing_key:
69
+ specification_version: 3
70
+ summary: An Extension for Sprockets to enable --bare option for CoffeeScript's compiler.
71
+ test_files: []