middleman-webpacker 1.1.0 → 1.2.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: c6efddebe963819bfbcaca0a954ac9eeb875d2c7
4
- data.tar.gz: 302c4518a20b76e58b365279daf6bcdd4c122361
3
+ metadata.gz: 518c3efe713131ffe330c8510fac201af1d456fe
4
+ data.tar.gz: 8ecc8e02d281e35f1dd5881854eb3402b9368be8
5
5
  SHA512:
6
- metadata.gz: 18e4919484d8674b8957a2c85157112c150e87aea3887df129a4de952843d90cc7e7251456d4fbcde5b93d553b4ba6ba5d8a27b0a9f69cecab675bac9bdbeb1b
7
- data.tar.gz: 91a384ba9764441320c9fcc905595dc1d9cc705a8ac68566f41ce18938de3979c33bbc434b229dc8f592e4685bcdfa44f7c521c2691684fdbea589e9280a4386
6
+ metadata.gz: 35479e1a01cbf2023e1af549fa9316cfe036b86b407b0229a2ef154bcd351c1ddd2379ef369db437dbf97fb733c4c937e05d341eea49e0155717cbd87e1240ed
7
+ data.tar.gz: cebe8001e19ac7add1a87a7526b3280d6476c7dfac761d1661830c0f075b18326078387384d92a0a0aeb92cad44d1346a24d5aaab41ecef9120da97340ca4402
data/README.md CHANGED
@@ -35,20 +35,24 @@ Then you need to provide your Webpack configuration inside the `config` folder.
35
35
 
36
36
  The extension provides the following configuration options:
37
37
 
38
- `dist_path` (default: 'dist')
38
+ * `development_webpack_cmd`
39
+ (default: './node_modules/webpack/bin/webpack.js --watch -d --progress --color --config config/webpack/development.js')\
40
+ command to run webpack in development mode
39
41
 
40
- Output directory configured in Webpack.
42
+ * `production_webpack_cmd`
43
+ (default: 'NODE_ENV=production ./node_modules/webpack/bin/webpack.js --bail --config config/webpack/production.js')\
44
+ command to run webpack in production mode
41
45
 
42
- `stylesheets_base_path` (default: '')
46
+ * `dist_path` (default: 'dist')\
47
+ Output directory configured in Webpack.
43
48
 
49
+ * `stylesheets_base_path` (default: '')\
44
50
  Base path where stylesheets will be placed inside dist_path.
45
51
 
46
- `javascripts_base_path` (default: '')
47
-
52
+ * `javascripts_base_path` (default: '')\
48
53
  Base path where javascripts will be placed inside dist_path.
49
54
 
50
- `images_base_path` (default: 'img/')
51
-
55
+ * `images_base_path` (default: 'img/')\
52
56
  Base path where images will be placed inside dist_path.
53
57
 
54
58
  ### Manifest
@@ -80,7 +84,7 @@ This means that all of these assets need to be covered in your Webpack configura
80
84
 
81
85
  In order to be able to use the assets compiled by Webpack from the HTML you can use the following helpers:
82
86
  * `javascript_pack_tag` which replaces `javascript_include_tag`
83
- * `stylesheet_pack_tag` which replaces `stylesheet_link_tag`
87
+ * `stylesheet_pack_tag` which replaces `stylesheet_link_tag`
84
88
  * `image_pack_tag` which replaces `image_tag`
85
89
  * `asset_pack_path` which replaces `asset_path`
86
90
 
@@ -4,11 +4,12 @@ require 'middleman-webpacker/helpers'
4
4
  module MiddlemanWebpacker
5
5
  class Extension < ::Middleman::Extension
6
6
 
7
- DEVELOPMENT_WEBPACK_CMD = './node_modules/webpack/bin/webpack.js ' \
8
- '--watch -d --progress --color --config config/webpack/development.js'
9
- PRODUCTION_WEBPACK_CMD = 'NODE_ENV=production ./node_modules/webpack/bin/webpack.js ' \
10
- '--bail -p --config config/webpack/production.js'
11
-
7
+ option :development_webpack_cmd, './node_modules/webpack/bin/webpack.js ' \
8
+ '--watch -d --progress --color --config config/webpack/development.js',
9
+ 'command to run webpack in development mode'
10
+ option :production_webpack_cmd, 'NODE_ENV=production ./node_modules/webpack/bin/webpack.js ' \
11
+ '--bail --config config/webpack/production.js',
12
+ 'command to run webpack in production mode'
12
13
  option :dist_path, 'dist', 'Output directory configured in Webpack'
13
14
  option :stylesheets_base_path, '', 'Base path where stylesheets will be placed inside dist_path'
14
15
  option :javascripts_base_path, '', 'Base path where javascripts will be placed inside dist_path'
@@ -31,7 +32,7 @@ module MiddlemanWebpacker
31
32
 
32
33
  @app.activate :external_pipeline,
33
34
  name: :webpack,
34
- command: @app.build? ? PRODUCTION_WEBPACK_CMD : DEVELOPMENT_WEBPACK_CMD,
35
+ command: @app.build? ? options.production_webpack_cmd : options.development_webpack_cmd,
35
36
  source: options.dist_path,
36
37
  latency: 1
37
38
  end
@@ -1,3 +1,3 @@
1
1
  module MiddlemanWebpacker
2
- VERSION = '1.1.0'
2
+ VERSION = '1.2.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: middleman-webpacker
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - MarsBased
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-03-19 00:00:00.000000000 Z
11
+ date: 2018-03-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: middleman-core