superuser 0.3.2 → 0.3.3

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: 9a1c31d05b650f4b02d719b16ac734f688688cd851a6385c501f6f690808f7ec
4
- data.tar.gz: e6d0c6a36beb2545af0aade3a658dd547477a5a579ce909d6d33aaf231fb02af
3
+ metadata.gz: 487d1ecfa49de1fdbe1f4b6de87d465f163087f78f2b6f938c36a290eeb1f457
4
+ data.tar.gz: 2ccb0b6c9deadff8e05068a0fab17eb650a0cc7e9969b44bd0870d2b0e8d12c9
5
5
  SHA512:
6
- metadata.gz: '08455a1986f43b3ce7223ca6d65922ba577ae9a89ac4d734c6841833522ee8cf4cbab8d88b34fe2ba1ef759a94cb019733eb5b78baf8105c71abcd79946aea48'
7
- data.tar.gz: a146ab5ac8596eedea709007a93b59e584f394ba22e32c244b6dcef84369cd021efc6107f319d083dc522de08380522078a0e3ffcd6c55bc435e519ab028c8a6
6
+ metadata.gz: 904adf9db5e4eef4b417f2fb66ff449ba44acb2b3d3449aca0785adfb4f4a2b2973a15cf2c2a68a9012f0bac35b5df1214c137879ac576e90b5dbebb14dc97a8
7
+ data.tar.gz: 0a0d7d7dcc1ff3d145c4e2e12a3eb2a40e7f9621ab4625570ca4b95012ae1b4c04b8ce91b61d079e3eab3ac9e6fb973e5b9c1b3036640d9a8e80380834ed74ad
@@ -13,7 +13,11 @@ class Superuser::InitGenerator < Rails::Generators::Base
13
13
  def generate_js_file
14
14
  superuser_js_file = "#{javascripts_folder()}/superuser.js"
15
15
  if !File.exist?(superuser_js_file)
16
- copy_file "superuser_base.js", superuser_js_file
16
+ if for_webpack_native
17
+ copy_file "webpack_native_base.js", superuser_js_file
18
+ else
19
+ copy_file "superuser_base.js", superuser_js_file
20
+ end
17
21
  end
18
22
  end
19
23
 
@@ -61,7 +65,7 @@ class Superuser::InitGenerator < Rails::Generators::Base
61
65
 
62
66
  webpack_config_file = "#{Rails.root}/app/webpack_native/webpack.config.js"
63
67
 
64
- entry_line = "\n\t\t\tsuperuser: './src/javascripts/superuser/application.js',"
68
+ entry_line = "\n\t\t\tsuperuser: './src/javascripts/superuser.js',"
65
69
 
66
70
  path = File.join(destination_root, 'app/webpack_native/webpack.config.js')
67
71
  file_content = File.read(path)
@@ -0,0 +1,3 @@
1
+ import '../stylesheets/superuser.scss';
2
+ // the following line requires that images folder exists
3
+ require.context('../images', true, /\.(gif|jpeg|jpg|png|svg)$/i);
@@ -1,3 +1,3 @@
1
1
  module Superuser
2
- VERSION = "0.3.2"
2
+ VERSION = "0.3.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: superuser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - mody
@@ -88,6 +88,7 @@ files:
88
88
  - lib/generators/superuser/templates/views/layouts/application.html.erb
89
89
  - lib/generators/superuser/templates/views/new.html.erb
90
90
  - lib/generators/superuser/templates/views/show.html.erb
91
+ - lib/generators/superuser/templates/webpack_native_base.js
91
92
  - lib/superuser.rb
92
93
  - lib/superuser/version.rb
93
94
  homepage: https://github.com/scratchoo/superuser