webpacker_cli 0.9.1 → 0.9.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 +9 -1
- data/lib/webpacker_cli/rails_template.rb +13 -3
- data/lib/webpacker_cli/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f44ef318c0ea3243c5736c36fd2415e82ebd386119bae8e94788d33c5c75566b
|
4
|
+
data.tar.gz: fc631ab6a0d4ceb76e3e3c669b4683279676d02880c60c8b7d391d65701a1df0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c245f57001eb56addd724ca930b6613f8d67ab991971d8cb83a34a362594b6cb2e231849211102debfb78206274f1a15a368aac0ca9c701335ac3981b47be844
|
7
|
+
data.tar.gz: 0a94c47d93283069c01eb0ab8d943990cfed204bde15112ca34e8ccb8c1eb762e3ac3893bc8b5327807b20c08c7b87e0d5e98737c050b9050ebf8e038b249ca2
|
data/README.md
CHANGED
@@ -8,7 +8,7 @@ other than Rails**. This is done by mocking the minimal amount of Rails for the
|
|
8
8
|
Rake commands to be able to run.
|
9
9
|
|
10
10
|
Webpacker itself takes Webpack, which has a primary focus for pre-processing JavaScript related
|
11
|
-
code, and make pre-processing other kinds of files such as
|
11
|
+
code, and make pre-processing other kinds of files such as CSS, SASS, Images, VueJS, React,
|
12
12
|
CoffeeScript, and other similar content as simple as a couple very minor edits. Without Webpacker
|
13
13
|
you would need to go through quite a bit of extra work to get Webpack to handle non JS items.
|
14
14
|
|
@@ -16,12 +16,16 @@ This project makes asset packing and cache invalidation easy for any web framewo
|
|
16
16
|
Webpacker's tooling to the command line. This cli tool is not meant to be used in a Rails project
|
17
17
|
_(at least not until it's designed to not overwrite a few files that exist in Rails)_.
|
18
18
|
|
19
|
+
This project has the same dependencies/prerequisites as [Webpacker](https://github.com/rails/webpacker#prerequisites).
|
20
|
+
|
19
21
|
## Installation
|
20
22
|
|
21
23
|
Install it yourself as:
|
22
24
|
|
23
25
|
$ gem install webpacker_cli
|
24
26
|
|
27
|
+
_Note: If you have trouble compiling the Nokogiri dependency on Linux try installing the following packages: `build-essential ruby-dev libxml2-dev`_
|
28
|
+
|
25
29
|
## Usage
|
26
30
|
|
27
31
|
General help is found with
|
@@ -60,6 +64,10 @@ This way Webpacker handles cache invalidation for you whenever you make changes
|
|
60
64
|
So the `manifest.json` is the key-value pair of data used to be substitued in your web page views
|
61
65
|
for the `src` references.
|
62
66
|
|
67
|
+
## Example Integration
|
68
|
+
|
69
|
+
For a good example of using this tool for integrating with your own language see [webpacker-rs](https://github.com/danielpclark/webpacker-rs). This library uses this tool to add Webpacker as part of the default build process of web deployment for the Rust language. In essence the user theirself is responsible for running `webpacker-cli init` and then **webpacker-rs** has two methods for deployment which validate dependencies on the server and then compile the assets. After deployment then **webpacker-rs** also provides a method for looking up the file mappings from the `manifest.json` file and provides a convenience helper method for dealing with the path routing.
|
70
|
+
|
63
71
|
## Contributing
|
64
72
|
|
65
73
|
Bug reports and pull requests are welcome on GitHub at https://github.com/danielpclark/webpacker-cli
|
@@ -39,12 +39,22 @@ require 'rails/commands'$
|
|
39
39
|
end
|
40
40
|
|
41
41
|
def gemspec_deps
|
42
|
-
|
43
|
-
specs = eval File.read(File.expand_path("../../webpacker_cli.gemspec", __dir__))
|
44
|
-
specs.runtime_dependencies.
|
42
|
+
gemspec.runtime_dependencies.
|
45
43
|
map {|i| "gem '#{i.name}', '#{i.requirement.requirements.join(' ')}'"}.
|
46
44
|
join("\n")
|
47
45
|
end
|
46
|
+
|
47
|
+
def gemspec
|
48
|
+
begin
|
49
|
+
Gem::Specification.find_by_name "webpacker_cli"
|
50
|
+
rescue
|
51
|
+
local_spec = File.expand_path("../../webpacker_cli.gemspec", __dir__)
|
52
|
+
|
53
|
+
raise "Gemspec not found for 'webpacker_cli'!" unless File.exist? local_spec
|
54
|
+
|
55
|
+
eval File.read(local_spec)
|
56
|
+
end
|
57
|
+
end
|
48
58
|
end
|
49
59
|
end
|
50
60
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: webpacker_cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel P. Clark
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-11-
|
11
|
+
date: 2018-11-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|