sprockets-es6-coffee 1.0.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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 2324b83c64051ec58787276ce7dc478fe298c014
4
+ data.tar.gz: bdc5109e7b7ff2b3b06aa16156b0a398c9b0356b
5
+ SHA512:
6
+ metadata.gz: ce0ce6a8c20ae65c3fc724527fed316d95d90aa3a296d523ba906af4943fdde3bd547903cbf80068c4a3190a18bee42dd4fb090a54562d412c4aed5a07807000
7
+ data.tar.gz: bd2dcef62bd1944fb01bb1e42dbe872b0bda117f58914912b8d8926d46b7c061e8726a2179b03de1c4b973912100d92e57901a5d4dedaac82a67efbeb819cf88
@@ -0,0 +1,4 @@
1
+ *.gem
2
+ .bundle
3
+ Gemfile.lock
4
+ pkg/*
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source :rubygems
2
+
3
+ gemspec
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2012 Ken Collins
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,15 @@
1
+ # Sprockets Es6Coffee
2
+
3
+ If we are using Coffeescript with ES6 modules, we do not want our Coffeescript compiled output to be wrapped in IIFEs as this is not supported by the ES6 spec.
4
+
5
+
6
+ ### Usage
7
+
8
+ Spec the gem in your Gemfile and bundle install.
9
+
10
+ ```ruby
11
+ gem 'sprockets-es6-coffee'
12
+ ```
13
+
14
+ The gem overrides the .coffee extension to not wrap Coffeescript compiled output in an IIFE *if* it will be processed by the .es6 module preprocessor.
15
+
@@ -0,0 +1,2 @@
1
+ require 'bundler/gem_tasks'
2
+
@@ -0,0 +1,5 @@
1
+ require 'sprockets'
2
+ require 'sprockets-es6-coffee/version'
3
+ require 'sprockets-es6-coffee/template'
4
+
5
+ Sprockets.register_engine '.coffee', Sprockets::Es6Coffee::Template
@@ -0,0 +1,19 @@
1
+ require 'tilt/coffee'
2
+
3
+ module Sprockets
4
+ module Es6Coffee
5
+ class Template < Tilt::CoffeeScriptTemplate
6
+
7
+ def evaluate(scope, locals, &block)
8
+ if scope.pathname.to_s.match /\.es6\.coffee/
9
+ options[:bare] = true
10
+ end
11
+
12
+ super
13
+ end
14
+
15
+ end
16
+
17
+ end
18
+ end
19
+
@@ -0,0 +1,5 @@
1
+ module Sprockets
2
+ module Es6Coffee
3
+ VERSION = '1.0.0'
4
+ end
5
+ end
@@ -0,0 +1,18 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "sprockets-es6-coffee/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = 'sprockets-es6-coffee'
7
+ s.version = Sprockets::Es6Coffee::VERSION
8
+ s.authors = ['Ken Collins', 'Mattia Gheda', 'Justin Giancola']
9
+ s.email = ['ken@metaskills.net', 'ghedamat@gmail.com', 'justin.giancola@gmail.com']
10
+ s.homepage = "http://github.com/elucid/sprockets-es6-coffee"
11
+ s.summary = %q{ES6 module-friendly Coffeescript compiler}
12
+ s.description = %q{Don't wrap Coffeescript compiled output in IIFEs if es6 module is being used}
13
+ s.files = `git ls-files`.split("\n")
14
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
15
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
16
+ s.require_paths = ['lib']
17
+ s.add_runtime_dependency 'sprockets', '~> 2.0'
18
+ end
metadata ADDED
@@ -0,0 +1,71 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: sprockets-es6-coffee
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Ken Collins
8
+ - Mattia Gheda
9
+ - Justin Giancola
10
+ autorequire:
11
+ bindir: bin
12
+ cert_chain: []
13
+ date: 2014-01-24 00:00:00.000000000 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: sprockets
17
+ requirement: !ruby/object:Gem::Requirement
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: '2.0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ requirements:
26
+ - - ~>
27
+ - !ruby/object:Gem::Version
28
+ version: '2.0'
29
+ description: Don't wrap Coffeescript compiled output in IIFEs if es6 module is being
30
+ used
31
+ email:
32
+ - ken@metaskills.net
33
+ - ghedamat@gmail.com
34
+ - justin.giancola@gmail.com
35
+ executables: []
36
+ extensions: []
37
+ extra_rdoc_files: []
38
+ files:
39
+ - .gitignore
40
+ - Gemfile
41
+ - MIT-LICENSE
42
+ - README.md
43
+ - Rakefile
44
+ - lib/sprockets-es6-coffee.rb
45
+ - lib/sprockets-es6-coffee/template.rb
46
+ - lib/sprockets-es6-coffee/version.rb
47
+ - sprockets-es6-coffee.gemspec
48
+ homepage: http://github.com/elucid/sprockets-es6-coffee
49
+ licenses: []
50
+ metadata: {}
51
+ post_install_message:
52
+ rdoc_options: []
53
+ require_paths:
54
+ - lib
55
+ required_ruby_version: !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - '>='
58
+ - !ruby/object:Gem::Version
59
+ version: '0'
60
+ required_rubygems_version: !ruby/object:Gem::Requirement
61
+ requirements:
62
+ - - '>='
63
+ - !ruby/object:Gem::Version
64
+ version: '0'
65
+ requirements: []
66
+ rubyforge_project:
67
+ rubygems_version: 2.1.11
68
+ signing_key:
69
+ specification_version: 4
70
+ summary: ES6 module-friendly Coffeescript compiler
71
+ test_files: []