browserify-rails 0.8.1 → 0.8.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -0
- data/lib/browserify-rails/browserify_processor.rb +1 -1
- data/lib/browserify-rails/version.rb +1 -1
- data/test/browserify_processor_test.rb +7 -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: cd5fc637d1dda848a5973d43d6dea615753eb0c2
|
4
|
+
data.tar.gz: 4a8fa4c524a48c5adc5715bc78fdc13b5616b08f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f765df8bc46c0433e7b52553681eeb8efbe8f314ff7d864074ad91029f95a3cfe245ac6c0805eea1f48398cfc93af6f0e36924fc17ad053249628cd581866301
|
7
|
+
data.tar.gz: 4899779f24c38748428e21341c81bae82e1cc15dec0cb70c685c207551beb5052b089254f49dc071b10cd8c2f1d5f3037fe2f2a3b22f15b2fc76ab90cc8d25f3
|
data/README.md
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
# browserify-rails
|
2
2
|
[![Build Status](https://travis-ci.org/browserify-rails/browserify-rails.svg?branch=master)](https://travis-ci.org/browserify-rails/browserify-rails)
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/browserify-rails.svg)](http://badge.fury.io/rb/browserify-rails)
|
3
4
|
|
4
5
|
This library adds CommonJS module support to Sprockets (via Browserify).
|
5
6
|
|
@@ -119,6 +120,11 @@ class My::Application < Rails::Application
|
|
119
120
|
|
120
121
|
# or as a string:
|
121
122
|
config.browserify_rails.commandline_options = "-t browserify-shim --fast"
|
123
|
+
|
124
|
+
# Define NODE_ENV to be used with envify
|
125
|
+
#
|
126
|
+
# defaults to Rails.env
|
127
|
+
config.browserify_rails.node_env = "production"
|
122
128
|
```
|
123
129
|
|
124
130
|
### browserify-incremental
|
@@ -40,7 +40,13 @@ class BrowserifyProcessorTest < ActiveSupport::TestCase
|
|
40
40
|
assert_equal "-d -i test4.js", @processor.send(:options)
|
41
41
|
end
|
42
42
|
|
43
|
-
test "env should have NODE_ENV set" do
|
43
|
+
test "env should have NODE_ENV set to Rails.application.config.browserify_rails.node_env" do
|
44
|
+
Rails.application.config.browserify_rails.node_env = "staging"
|
45
|
+
assert_equal "staging", @processor.send(:env)["NODE_ENV"]
|
46
|
+
end
|
47
|
+
|
48
|
+
test "env should have NODE_ENV default to Rails.env" do
|
49
|
+
Rails.application.config.browserify_rails.node_env = nil
|
44
50
|
assert_equal Rails.env, @processor.send(:env)["NODE_ENV"]
|
45
51
|
end
|
46
52
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: browserify-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Henry Hsu, Cymen Vig
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-04-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sprockets
|
@@ -216,7 +216,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
216
216
|
version: '0'
|
217
217
|
requirements: []
|
218
218
|
rubyforge_project:
|
219
|
-
rubygems_version: 2.
|
219
|
+
rubygems_version: 2.4.5
|
220
220
|
signing_key:
|
221
221
|
specification_version: 4
|
222
222
|
summary: 'Get the best of both worlds: Browserify + Rails = CommonJS Heaven'
|