webpacker 4.0.0.pre.pre.1 → 4.0.0.pre.pre.2

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
  SHA256:
3
- metadata.gz: 9ce86b1030177d36c96b211f3c3a939714b05dfc7ca09f7e9355ad677d6657bc
4
- data.tar.gz: 209c6ae1d4fc283cda9bf8270c4edc6c614020eb92484b6d8a248c7f98a26862
3
+ metadata.gz: e9ff740a84754003342f8f34b560dca75fd9ee004d61f7b0b52d1c8f087d9f03
4
+ data.tar.gz: 6faf6c891f003ef0cabefbc370a8937a24464cf92ac4379188ed7fe565048fed
5
5
  SHA512:
6
- metadata.gz: 2f1b984c69ab267777ba8efc7a4d24f6746c4e3e0eab42e285ea5f593730c8041a027c09f44e26644dcb8acbcd7caf10e916d1226043b01a7f573f488318ecfc
7
- data.tar.gz: 65c10dd913612c8d027322c5b95d45921b36dad09d1928df4008784ab7f1a960dea1500bb97201e572bc8a380378d6ac8b0131327451aecbafef3f5f8ec54fe5
6
+ metadata.gz: ef5e0178b7fd4a788a7c98990277fab1f643ccafa4758dd80ceb448d915ca7df03960beebf6cce82ddcd3bdb0e5e89637100c9bb4043fd8d0a7df65b54c9762a
7
+ data.tar.gz: b79761d39e022de3374ffd21d5b6a990944713a448e27c14a614e261e259d0321de0e03bfab8135274bb538a4db1a2841f8ec9e3bd2ede002d45a6a925b3d33a
@@ -1,19 +1,26 @@
1
1
  **Please note that Webpacker 3.1.0 and 3.1.1 have some serious bugs so please consider using either 3.0.2 or 3.2.0**
2
2
 
3
+ ## [4.0.0-pre.2] - 2018-04-2
4
+
5
+ ## Fixed
6
+
7
+ - Webpack dev server version in installer
8
+
9
+
3
10
  ## [4.0.0-pre.1] - 2018-04-2
4
11
 
5
12
  Pre-release to try out webpack 4.0 support
6
13
 
7
- ## Added
14
+ ### Added
8
15
  - Webpack 4.0 support [#1376](https://github.com/rails/webpacker/pull/1316)
9
16
 
10
- ## Fixed
17
+ ### Fixed
11
18
  - Remove compilation digest file if webpack command fails[#1398](https://github.com/rails/webpacker/issues/1398)
12
19
 
13
20
 
14
21
  ## [3.4.1] - 2018-03-24
15
22
 
16
- ## Fixed
23
+ ### Fixed
17
24
  - Yarn integrity check in development [#1374](https://github.com/rails/webpacker/issues/1374)
18
25
 
19
26
 
@@ -21,7 +28,7 @@ Pre-release to try out webpack 4.0 support
21
28
 
22
29
  **Please use 3.4.1 instead**
23
30
 
24
- ## Added
31
+ ### Added
25
32
  - Support for custom Rails environments [#1359](https://github.com/rails/webpacker/pull/1359)
26
33
 
27
34
  *This could break the compilation if you set NODE_ENV to custom environment. Now, NODE_ENV only understands production or development mode*
@@ -29,7 +36,7 @@ Pre-release to try out webpack 4.0 support
29
36
 
30
37
  ## [3.3.1] - 2018-03-12
31
38
 
32
- ## Fixed
39
+ ### Fixed
33
40
 
34
41
  - Use webpack dev server 2.x until webpacker supports webpack 4.x [#1338](https://github.com/rails/webpacker/issues/1338)
35
42
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- webpacker (4.0.0.pre.pre.1)
4
+ webpacker (4.0.0.pre.pre.2)
5
5
  activesupport (>= 4.2)
6
6
  rack-proxy (>= 0.6.1)
7
7
  railties (>= 4.2)
data/README.md CHANGED
@@ -85,6 +85,9 @@ gem 'webpacker', '~> 3.4'
85
85
 
86
86
  # OR if you prefer to use master
87
87
  gem 'webpacker', git: 'https://github.com/rails/webpacker.git'
88
+
89
+ # OR to try out 4.x pre-release
90
+ gem 'webpacker', '>= 4.0.x'
88
91
  ```
89
92
 
90
93
  Finally, run following to install Webpacker:
@@ -254,6 +257,9 @@ You can run following commands to upgrade Webpacker to the latest stable version
254
257
  bundle update webpacker
255
258
  yarn upgrade @rails/webpacker --latest
256
259
  yarn add webpack-dev-server@^2.11.1
260
+
261
+ # Or to install a latest release (including pre-releases)
262
+ yarn add @rails/webpacker
257
263
  ```
258
264
 
259
265
  ### Yarn Integrity
@@ -44,7 +44,7 @@ say "Installing all JavaScript dependencies"
44
44
  run "yarn add @rails/webpacker"
45
45
 
46
46
  say "Installing dev server for live reloading"
47
- run "yarn add --dev webpack-dev-server@2.11.2"
47
+ run "yarn add --dev webpack-dev-server"
48
48
 
49
49
  if Rails::VERSION::MAJOR == 5 && Rails::VERSION::MINOR > 1
50
50
  say "You need to allow webpack-dev-server host as allowed origin for connect-src.", :yellow
@@ -33,6 +33,16 @@ module Webpacker::Helper
33
33
  end
34
34
  end
35
35
 
36
+ # Creates a image tag that references the named pack file.
37
+ #
38
+ # Example:
39
+ #
40
+ # <%= image_pack_tag 'application.png', size: '16x10', alt: 'Edit Entry' %>
41
+ # <img alt='Edit Entry' src='/packs/application-k344a6d59eef8632c9d1.png' width='16' height='10' />
42
+ def image_pack_tag(name, **options)
43
+ image_tag(asset_path(Webpacker.manifest.lookup!(name)), **options)
44
+ end
45
+
36
46
  # Creates a script tag that references the named pack file, as compiled by webpack per the entries list
37
47
  # in config/webpack/shared.js. By default, this list is auto-generated to match everything in
38
48
  # app/javascript/packs/*.js. In production mode, the digested reference is automatically looked up.
@@ -1,4 +1,4 @@
1
1
  module Webpacker
2
2
  # Change the version in package.json too, please!
3
- VERSION = "4.0.0-pre.1".freeze
3
+ VERSION = "4.0.0-pre.2".freeze
4
4
  end
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rails/webpacker",
3
- "version": "4.0.0-pre.1",
3
+ "version": "4.0.0-pre.2",
4
4
  "description": "Use webpack to manage app-like JavaScript modules in Rails",
5
5
  "main": "package/index.js",
6
6
  "files": [
@@ -31,6 +31,12 @@ class HelperTest < ActionView::TestCase
31
31
  assert_equal "https://example.com/packs/bootstrap-c38deda30895059837cf.css", asset_pack_url("bootstrap.css")
32
32
  end
33
33
 
34
+ def test_image_pack_tag
35
+ assert_equal \
36
+ "<img alt=\"Edit Entry\" src=\"/packs/application-k344a6d59eef8632c9d1.png\" width=\"16\" height=\"10\" />",
37
+ image_pack_tag("application.png", size: "16x10", alt: "Edit Entry")
38
+ end
39
+
34
40
  def test_javascript_pack_tag
35
41
  assert_equal \
36
42
  %(<script src="/packs/bootstrap-300631c4f0e0f9c865bc.js"></script>),
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webpacker
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0.pre.pre.1
4
+ version: 4.0.0.pre.pre.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Heinemeier Hansson