webpack_native 0.3.1 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/webpack_native.rb +2 -2
- data/lib/webpack_native/railtie.rb +2 -2
- data/lib/webpack_native/version.rb +1 -1
- data/lib/{generators/webpack_native/templates → webpack_native}/webpack_native_helper.rb +1 -1
- metadata +3 -4
- data/lib/generators/webpack_native/helper_generator.rb +0 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bae1d84ac86e83ef247ba78c99dd443784d4f153f9068605ccc14434a7cf3a39
|
4
|
+
data.tar.gz: 9b3c19d6815e6b5c3338867c6be132dbcd7ee84ee4f9c87358d8162a6da9a3c1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6706cf0ae3fa842b3e1c4f2cf53b287641e86de3ffe93c789c70dc50257f7f9c279f494a4d030c87c6daeebd753c1ec439f37f39a4dbf7b7e652b2a48be12ad2
|
7
|
+
data.tar.gz: bb6aa8c0cb6c0c0531f12e1c67f5c9421d2e9093214204490cb89d0c431a2400051e70cc74ebc956ddebd59b8315cbe3d68f7e007eed79353f542b5055564c34
|
data/lib/webpack_native.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
require "webpack_native/version"
|
2
|
-
require '
|
2
|
+
require 'webpack_native/webpack_native_helper'
|
3
3
|
require 'webpack_native/runner'
|
4
4
|
require 'webpack_native/railtie' if defined?(Rails)
|
5
5
|
|
@@ -16,5 +16,5 @@ end
|
|
16
16
|
|
17
17
|
# include WebpackNativeHelper for ActionView
|
18
18
|
ActiveSupport.on_load :action_view do
|
19
|
-
::ActionView::Base.send :include, WebpackNativeHelper
|
19
|
+
::ActionView::Base.send :include, WebpackNative::WebpackNativeHelper
|
20
20
|
end
|
@@ -9,8 +9,8 @@ class WebpackNative::Railtie < ::Rails::Railtie
|
|
9
9
|
|
10
10
|
initializer "webpack_native_set_manifest" do
|
11
11
|
if Rails.env.production?
|
12
|
-
require_relative '
|
13
|
-
Rails.configuration.x.webpack_native.webpack_manifest_file = WebpackNativeHelper.load_webpack_manifest
|
12
|
+
require_relative 'webpack_native_helper'
|
13
|
+
Rails.configuration.x.webpack_native.webpack_manifest_file = WebpackNative::WebpackNativeHelper.load_webpack_manifest
|
14
14
|
end
|
15
15
|
end
|
16
16
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: webpack_native
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- scratchoo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-10-
|
11
|
+
date: 2020-10-07 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Use vanilla webpack to manage your assets efficiently, no webpacker or
|
14
14
|
asset pipeline anymore!
|
@@ -19,18 +19,17 @@ extensions: []
|
|
19
19
|
extra_rdoc_files: []
|
20
20
|
files:
|
21
21
|
- lib/generators/webpack_native/dev_generator.rb
|
22
|
-
- lib/generators/webpack_native/helper_generator.rb
|
23
22
|
- lib/generators/webpack_native/install_generator.rb
|
24
23
|
- lib/generators/webpack_native/prod_generator.rb
|
25
24
|
- lib/generators/webpack_native/templates/webpack_native/package.json
|
26
25
|
- lib/generators/webpack_native/templates/webpack_native/src/javascripts/application.js
|
27
26
|
- lib/generators/webpack_native/templates/webpack_native/src/stylesheets/application.scss
|
28
27
|
- lib/generators/webpack_native/templates/webpack_native/webpack.config.js
|
29
|
-
- lib/generators/webpack_native/templates/webpack_native_helper.rb
|
30
28
|
- lib/webpack_native.rb
|
31
29
|
- lib/webpack_native/railtie.rb
|
32
30
|
- lib/webpack_native/runner.rb
|
33
31
|
- lib/webpack_native/version.rb
|
32
|
+
- lib/webpack_native/webpack_native_helper.rb
|
34
33
|
homepage: https://www.github.com/scratchoo/webpack_native
|
35
34
|
licenses:
|
36
35
|
- MIT
|
@@ -1,22 +0,0 @@
|
|
1
|
-
class WebpackNative::HelperGenerator < Rails::Generators::Base
|
2
|
-
|
3
|
-
# our templates location:
|
4
|
-
source_root File.expand_path('templates', __dir__)
|
5
|
-
|
6
|
-
#this is used to generate/add the helper file to rails project
|
7
|
-
def add_webpack_helper
|
8
|
-
template "webpack_native_helper.rb", File.join("app/helpers", "webpack_native_helper.rb")
|
9
|
-
end
|
10
|
-
|
11
|
-
# include_webpack_helper in application_controller.rb
|
12
|
-
def include_webpack_helper
|
13
|
-
application_controller = "#{Rails.root}/app/controllers/application_controller.rb"
|
14
|
-
|
15
|
-
include_webpack_helper = "\n\tinclude WebpackNativeHelper"
|
16
|
-
|
17
|
-
class_declaration = 'class ApplicationController < ActionController::Base'
|
18
|
-
|
19
|
-
inject_into_file application_controller, include_webpack_helper, after: class_declaration
|
20
|
-
end
|
21
|
-
|
22
|
-
end
|