webpacker-routes 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +6 -0
- data/lib/webpacker/routes/railtie.rb +1 -1
- data/lib/webpacker/routes/version.rb +1 -1
- metadata +22 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2df2a8394731fbcdcf3ca655bc2828445059ca63fb43f907f979f7aa086baa8a
|
4
|
+
data.tar.gz: b90011254262095c3ec086d0ed3f25b0de9b24ab5cc68e7f8d776e2610cbe8a1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1bad512988328796c14bd7c6049834d46d02bbdaf27d9fdd2e2f70d33c3f816c3e209ccbaf225a086fef1ad6bd25f4098c0b11fbb5e2641150603a3dc632730f
|
7
|
+
data.tar.gz: 44e7c1538a4078ce206cc769c852aa7907d867e46c4ba844966d8163702e5863c2a96eee99fca78186ca5cedbc2cd90983cc4ff5d48cb91dffbd23d9e73a1820
|
data/README.md
CHANGED
@@ -1,7 +1,9 @@
|
|
1
1
|
# Webpacker::Routes
|
2
|
+
|
2
3
|
Webpacker Routes allows you to import Rails routes in your Webpacker javascript.
|
3
4
|
|
4
5
|
## Installation
|
6
|
+
|
5
7
|
Add this line to your application's Gemfile:
|
6
8
|
|
7
9
|
```ruby
|
@@ -9,12 +11,14 @@ gem 'webpacker-routes'
|
|
9
11
|
```
|
10
12
|
|
11
13
|
And then execute:
|
14
|
+
|
12
15
|
```bash
|
13
16
|
$ bundle
|
14
17
|
$ bundle exec rails webpacker:install:routes
|
15
18
|
```
|
16
19
|
|
17
20
|
## Usage
|
21
|
+
|
18
22
|
Import individual routes from any Webpacker-compiled file:
|
19
23
|
|
20
24
|
```javascript
|
@@ -52,6 +56,7 @@ The routes file is generated when Rails starts, including during `webpacker:comp
|
|
52
56
|
In development, routes will be updated when a file changes and a request is processed.
|
53
57
|
|
54
58
|
To generate routes manually, run:
|
59
|
+
|
55
60
|
```bash
|
56
61
|
$ bundle exec rails webpacker:routes:generate
|
57
62
|
```
|
@@ -62,4 +67,5 @@ $ bundle exec rails webpacker:routes:generate
|
|
62
67
|
- `config.webpacker.routes.camel_case` - convert route names to camel case. Default: `false`
|
63
68
|
|
64
69
|
## License
|
70
|
+
|
65
71
|
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
@@ -8,7 +8,7 @@ module Webpacker
|
|
8
8
|
config.webpacker.routes.camel_case = false
|
9
9
|
|
10
10
|
config.after_initialize do |app|
|
11
|
-
if Rails
|
11
|
+
if Rails.gem_version >= Gem::Version.new('5.0.0')
|
12
12
|
app.reloader.to_run(:after) { Webpacker::Routes.generate(app) }
|
13
13
|
else
|
14
14
|
ActionDispatch::Reloader.to_prepare(:after) { Webpacker::Routes.generate(app) }
|
metadata
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: webpacker-routes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Harsha
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-05-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: railties
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '3'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rails
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '4.2'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '4.2'
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: sqlite3
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -66,7 +80,7 @@ dependencies:
|
|
66
80
|
- - ">="
|
67
81
|
- !ruby/object:Gem::Version
|
68
82
|
version: '0'
|
69
|
-
description:
|
83
|
+
description:
|
70
84
|
email:
|
71
85
|
- davishmcclurg@gmail.com
|
72
86
|
executables: []
|
@@ -86,7 +100,7 @@ licenses:
|
|
86
100
|
- MIT
|
87
101
|
metadata:
|
88
102
|
source_code_uri: https://github.com/davishmcclurg/webpacker-routes
|
89
|
-
post_install_message:
|
103
|
+
post_install_message:
|
90
104
|
rdoc_options: []
|
91
105
|
require_paths:
|
92
106
|
- lib
|
@@ -101,9 +115,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
101
115
|
- !ruby/object:Gem::Version
|
102
116
|
version: '0'
|
103
117
|
requirements: []
|
104
|
-
|
105
|
-
|
106
|
-
signing_key:
|
118
|
+
rubygems_version: 3.3.7
|
119
|
+
signing_key:
|
107
120
|
specification_version: 4
|
108
121
|
summary: Convert Rails routes to JavaScript modules
|
109
122
|
test_files: []
|