sprockets-commoner 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/js/babel-plugin-sprockets-commoner-internal/index.js +5 -2
- data/lib/sprockets/commoner/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8c966579c74d914919277d60a4d2dc6f3738e4dc
|
4
|
+
data.tar.gz: e9121bab180fabdc0ba4336149f58a91847bcde5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 94ed97e08219884f90f18bbf8829ce061c9cc51d47adbeb21e3b3cf91209dc55b6307348f5e631a3d17f63658f07b369cae7420f5cf81d80185a0f7ef6b9baba
|
7
|
+
data.tar.gz: 2bedd0b57bfcbaa99e8ddb6e52f876d344619ad6212e8e010dd434cb8665407621fed4ddc95829c4b4142a69f9e482b4f95ed855692196e4aca8c3921a20f7bb
|
data/CHANGELOG.md
CHANGED
@@ -56,7 +56,7 @@ module.exports = function (context) {
|
|
56
56
|
* If we're requiring a CoffeeScript file, we're going to be assuming that we're assigning to the global namespace in that file.
|
57
57
|
* so, use a RegExp to find out that variable definition. (yep)
|
58
58
|
*/
|
59
|
-
function findDeclarationInCoffeeFile(path) {
|
59
|
+
function findDeclarationInCoffeeFile(path, ensureIdentifierIsPresent) {
|
60
60
|
var contents = fs.readFileSync(path);
|
61
61
|
var identifiers = [];
|
62
62
|
|
@@ -65,6 +65,9 @@ module.exports = function (context) {
|
|
65
65
|
}
|
66
66
|
|
67
67
|
if (identifiers.length === 0) {
|
68
|
+
if (ensureIdentifierIsPresent) {
|
69
|
+
throw new Error('No identifier found in ' + path);
|
70
|
+
}
|
68
71
|
return false;
|
69
72
|
} else if (identifiers.length > 1) {
|
70
73
|
throw new Error('Multiple identifiers found in ' + path);
|
@@ -136,7 +139,7 @@ module.exports = function (context) {
|
|
136
139
|
|
137
140
|
if (/\.coffee$/.test(resolvedPath)) {
|
138
141
|
// If it's a coffee script file, look for global variable assignments.
|
139
|
-
return findDeclarationInCoffeeFile(resolvedPath);
|
142
|
+
return findDeclarationInCoffeeFile(resolvedPath, ensureTargetIsProcessed);
|
140
143
|
} else {
|
141
144
|
if (ensureTargetIsProcessed) {
|
142
145
|
file.metadata.targetsToProcess.push(resolvedPath);
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sprockets-commoner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bouke van der Bijl
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-07-
|
11
|
+
date: 2016-07-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sprockets
|
@@ -181,7 +181,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
181
181
|
version: '0'
|
182
182
|
requirements: []
|
183
183
|
rubyforge_project:
|
184
|
-
rubygems_version: 2.
|
184
|
+
rubygems_version: 2.5.1
|
185
185
|
signing_key:
|
186
186
|
specification_version: 4
|
187
187
|
summary: Use Babel in Sprockets to compile modules for the browser
|