npm-pipeline-rails 1.1.3 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b2352c0fdaa7671d81dc16dfd8f988a530c2902f
4
- data.tar.gz: c4af142a7947dfba2c2cd6e0f2861ead7c7afce5
3
+ metadata.gz: e04615211140d67774af0ad6d62705b210d7fe0a
4
+ data.tar.gz: 0857f5f24eeb6012f9f87ba96d8d065614e8127c
5
5
  SHA512:
6
- metadata.gz: 48f150a8c4c481db5c4f74930c33e64e5f06f35797248290a5101ec83a075255decf1436be4b157c7e85c764e4151199c679f09ef590dee542de16a1aee605c0
7
- data.tar.gz: ae0c08154b8d9e36871da192f2b4865c0f52cf9496492bd13acc6df7ef5d8b1bf951384d8a3adea22c75e921b7df1afc015a4dfafddb5664c2cc80e0a8610cd4
6
+ metadata.gz: 067dee14278cebeb98f2132df66e65683ecf70473b2c181dc01e6875f1759b4fc3b380223c0ce229d761582c9f9c0383a80c6cc874a5405182ea4591d6bf5380
7
+ data.tar.gz: 47eb06a1433e22d9e508def1e9d7b44caef4fe2bd5e8c3db2d6289cf158d17c6eee8ff82eb78ecde6c20217bef31cf6e57e9771afabb5bb564ad27b4141cef60
data/HISTORY.md CHANGED
@@ -1,3 +1,18 @@
1
+ ## [v1.3.0]
2
+ > Apr 11, 2016
3
+
4
+ - [#1] - Update support for Rails 5. ([@victorsolis])
5
+ - [#1] - Fix issues with gitignore files that don't have a new line at the end. ([@victorsolis])
6
+
7
+ [v1.3.0]: https://github.com/rstacruz/npm-pipeline-rails/compare/v1.2.0...v1.3.0
8
+
9
+ ## [v1.2.0]
10
+ > Mar 23, 2016
11
+
12
+ - Add experimental support for Rails 5.
13
+
14
+ [v1.2.0]: https://github.com/rstacruz/npm-pipeline-rails/compare/v1.1.3...v1.2.0
15
+
1
16
  ## [v1.1.3]
2
17
  > Mar 22, 2016
3
18
 
@@ -32,3 +47,5 @@
32
47
  - Initial release.
33
48
 
34
49
  [v1.0.0]: https://github.com/rstacruz/npm-pipeline-rails/tree/v1.0.0
50
+ [#1]: https://github.com/rstacruz/npm-pipeline-rails/issues/1
51
+ [@victorsolis]: https://github.com/victorsolis
data/README.md CHANGED
@@ -7,8 +7,8 @@ npm-pipeline-rails allows you to use any toolchain to bulid your asset files in
7
7
  - Use [Brunch][] with Rails ([instructions](docs/brunch.md))
8
8
  - Use [Gulp][] with Rails ([instructions](docs/gulp.md))
9
9
  - Use [Grunt][] with Rails
10
- - Use [Webpack][] with Rails
11
10
  - Use [Browserify][] with Rails
11
+ - Use [Broccoli][] with Rails
12
12
  - Use any other asset tool with Rails
13
13
 
14
14
  [Rails]: http://rubyonrails.org/
@@ -26,6 +26,8 @@ npm-pipeline-rails allows you to use any toolchain to bulid your asset files in
26
26
 
27
27
  <br>
28
28
 
29
+ [Broccoli]: https://github.com/broccolijs/broccoli
30
+
29
31
  ## Usage
30
32
 
31
33
  Add this line below to your `Gemfile`. After that, proceed with an automated or manual setup.
@@ -43,7 +45,14 @@ Use the generators for your preferred build tool:
43
45
 
44
46
  #### Manual setup
45
47
 
46
- * Create a `package.json` with `start` and `build` scripts. ([See example](lib/generators/npm_pipeline/brunch/package.json))
48
+ * Put together a setup with [Brunch], [Broccoli], [Gulp], or any other tool. It should:
49
+ * Take source files from `app/brunch/`
50
+ * Render JS to `vendor/assets/stylesheets/brunch/`
51
+ * Render CSS to `vendor/assets/javascripts/brunch/`
52
+ * _(Replace `brunch` with whatever build tool you use.)_
53
+ * Create a `package.json` with `start` and `build` scripts to point to this setup. ([See example](lib/generators/npm_pipeline/brunch/package.json))
54
+ * `start` - Configure this script to run a development file watcher.
55
+ * `build` - Configure this script to run a production compiler.
47
56
  * Add your expected compiled assets to `.gitignore`.
48
57
 
49
58
  #### Set up support for tests
@@ -52,6 +61,15 @@ If you're using continuous integration for your tests, configure it to run `bund
52
61
 
53
62
  For tests running in your development machine, ensure that asset files are available when running your tests. This means starting your dev server at least once before running tests, or invoking `rake assets:npm_build` manually.
54
63
 
64
+ #### Disable some gems
65
+
66
+ You may also want to disable some gems, depending on your set up:
67
+
68
+ - Disable `uglifyjs` if you already do minification in your npm tool.
69
+ - Disable `autoprefixer-rails` if you already do autoprefixing in your npm tool.
70
+ - Disable `sprockets-es6` if you already do ES6 compiling in your npm tool.
71
+ - _and so on..._
72
+
55
73
  <br>
56
74
 
57
75
  ## Configuration
@@ -101,6 +119,16 @@ Consult [railtie.rb](https://github.com/rstacruz/npm-pipeline-rails/blob/master/
101
119
 
102
120
  <br>
103
121
 
122
+ ## Skipping Rails asset pipeline
123
+
124
+ The recommended setup renders files to `vendor/assets/stylesheets/brunch/` and `vendor/assets/javascripts/brunch/`. (Replace `brunch` with whatever build tool you use.) You may opt to output to `public/assets/stylesheets/` and `public/assets/javascripts/` instead.
125
+
126
+ This is not recommended since you will miss out on automatic asset fingerprinting, among other nice integrations.
127
+
128
+ If you do this, you will need to run `npm run build` as part of your deploy script and CI test script.
129
+
130
+ <br>
131
+
104
132
  ## Motivation
105
133
 
106
134
  Rails's asset pipeline was a great step forward for Rails 3. For today's requirements however, it doesn't always come with all the tools you need. npm-pipeline-rails lets you outsource asset building complexities to Node.js-based tools.
@@ -109,6 +137,11 @@ Rails's asset pipeline was a great step forward for Rails 3. For today's require
109
137
 
110
138
  <br>
111
139
 
140
+ ## Also see
141
+
142
+ - [webpack-assets](https://github.com/toptal/webpack-assets) - integration for webpack-dev-server
143
+ - [browserify-rails](https://rubygems.org/gems/browserify-rails) - browserify for the asset pipeline
144
+
112
145
  ## Thanks
113
146
 
114
147
  **npm-pipeline-rails** © 2016+, Rico Sta. Cruz. Released under the [MIT] License.<br>
@@ -33,9 +33,9 @@ module NpmPipeline
33
33
 
34
34
  def update_gitignore
35
35
  append_to_file '.gitignore',
36
- "/node_modules\n" +
37
- "/vendor/assets/stylesheets/brunch\n" +
38
- "/vendor/assets/javascripts/brunch\n"
36
+ "\n/node_modules" +
37
+ "\n/vendor/assets/stylesheets/brunch" +
38
+ "\n/vendor/assets/javascripts/brunch\n"
39
39
  end
40
40
  end
41
41
  end
@@ -33,9 +33,9 @@ module NpmPipeline
33
33
 
34
34
  def update_gitignore
35
35
  append_to_file '.gitignore',
36
- "/node_modules\n" +
37
- "/vendor/assets/stylesheets/gulp\n" +
38
- "/vendor/assets/javascripts/gulp\n"
36
+ "\n/node_modules" +
37
+ "\n/vendor/assets/stylesheets/gulp" +
38
+ "\n/vendor/assets/javascripts/gulp\n"
39
39
  end
40
40
  end
41
41
  end
@@ -1,3 +1,3 @@
1
1
  module NpmPipelineRails
2
- VERSION = '1.1.3'
2
+ VERSION = '1.3.0'
3
3
  end
@@ -19,11 +19,11 @@ Gem::Specification.new do |spec|
19
19
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
20
  spec.require_paths = ['lib']
21
21
 
22
- spec.add_runtime_dependency 'railties', '~> 4.0'
22
+ spec.add_runtime_dependency 'railties', '>= 4.0.0', '< 6.0.0'
23
23
  spec.add_runtime_dependency 'sprockets', '~> 3.5'
24
24
 
25
25
  spec.add_development_dependency 'bundler', '~> 1.11'
26
26
  spec.add_development_dependency 'rake', '~> 10.0'
27
27
  spec.add_development_dependency 'minitest', '~> 5.0'
28
- spec.add_development_dependency 'rails', '~> 4.2'
28
+ spec.add_development_dependency 'rails', '>= 4.2', '< 5.1'
29
29
  end
metadata CHANGED
@@ -1,29 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: npm-pipeline-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rico Sta. Cruz
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-03-22 00:00:00.000000000 Z
11
+ date: 2016-04-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 4.0.0
20
+ - - "<"
18
21
  - !ruby/object:Gem::Version
19
- version: '4.0'
22
+ version: 6.0.0
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - "~>"
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: 4.0.0
30
+ - - "<"
25
31
  - !ruby/object:Gem::Version
26
- version: '4.0'
32
+ version: 6.0.0
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: sprockets
29
35
  requirement: !ruby/object:Gem::Requirement
@@ -84,16 +90,22 @@ dependencies:
84
90
  name: rails
85
91
  requirement: !ruby/object:Gem::Requirement
86
92
  requirements:
87
- - - "~>"
93
+ - - ">="
88
94
  - !ruby/object:Gem::Version
89
95
  version: '4.2'
96
+ - - "<"
97
+ - !ruby/object:Gem::Version
98
+ version: '5.1'
90
99
  type: :development
91
100
  prerelease: false
92
101
  version_requirements: !ruby/object:Gem::Requirement
93
102
  requirements:
94
- - - "~>"
103
+ - - ">="
95
104
  - !ruby/object:Gem::Version
96
105
  version: '4.2'
106
+ - - "<"
107
+ - !ruby/object:Gem::Version
108
+ version: '5.1'
97
109
  description: Use any toolchain to bulid your asset files in Rails 4.2. Integrate Brunch,
98
110
  Gulp, Grunt, Webpack, Browserify and others seamlessly into Rails apps.
99
111
  email: