cssbundling-rails 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cssbundling/version.rb +1 -1
- data/lib/install/install.rb +22 -3
- 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: a70423b8588a0b537518131ad10a0a702e5891343a3800ac099c13de2a2b8e1f
|
4
|
+
data.tar.gz: 237ee6613b56c3296a1ad95b78cdb6bac8cd78a900879f006ce06c1ec314fca8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 005d6451373ec31e23cdca38b8f75bd32426bcabb94bc7c7d88675e682a24c75a104b8fcab0725806503f22cf04c388fe25bdb2ffd67ff92871856f711576ef3
|
7
|
+
data.tar.gz: '08966254d0702d793a7f09322b8a01820c42a5cc76d23ee4d6cc991a849a23be5a548329f7c804afcbeff422b672689cff1b49a4de66a57bc3f25f2f32b74d85'
|
data/lib/cssbundling/version.rb
CHANGED
data/lib/install/install.rb
CHANGED
@@ -4,22 +4,41 @@ keep_file "app/assets/builds"
|
|
4
4
|
append_to_file "app/assets/config/manifest.js", %(//= link_tree ../builds\n)
|
5
5
|
|
6
6
|
say "Stop linking stylesheets automatically"
|
7
|
-
gsub_file "app/assets/config/manifest.js", "//= link_directory ../stylesheets .css", ""
|
7
|
+
gsub_file "app/assets/config/manifest.js", "//= link_directory ../stylesheets .css\n", ""
|
8
8
|
|
9
9
|
if Rails.root.join(".gitignore").exist?
|
10
|
-
append_to_file(".gitignore", %(/app/assets/builds/*\n!/app/assets/builds/.keep\n))
|
10
|
+
append_to_file(".gitignore", %(\n/app/assets/builds/*\n!/app/assets/builds/.keep\n))
|
11
|
+
append_to_file(".gitignore", %(\n/node_modules\n))
|
11
12
|
end
|
12
13
|
|
13
14
|
say "Remove app/assets/stylesheets/application.css so build output can take over"
|
14
15
|
remove_file "app/assets/stylesheets/application.css"
|
15
16
|
|
17
|
+
if (app_layout_path = Rails.root.join("app/views/layouts/application.html.erb")).exist?
|
18
|
+
say "Add stylesheet link tag in application layout"
|
19
|
+
insert_into_file(
|
20
|
+
app_layout_path.to_s,
|
21
|
+
defined?(Turbo) ?
|
22
|
+
%(\n <%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>) :
|
23
|
+
%(\n <%= stylesheet_link_tag "application" %>),
|
24
|
+
before: /\s*<\/head>/
|
25
|
+
)
|
26
|
+
else
|
27
|
+
say "Default application.html.erb is missing!", :red
|
28
|
+
if defined?(Turbo)
|
29
|
+
say %( Add <%= stylesheet_link_tag "application", "data-turbo-track": "reload" %> within the <head> tag in your custom layout.)
|
30
|
+
else
|
31
|
+
say %( Add <%= stylesheet_link_tag "application" %> within the <head> tag in your custom layout.)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
16
35
|
unless Rails.root.join("package.json").exist?
|
17
36
|
say "Add default package.json"
|
18
37
|
copy_file "#{__dir__}/package.json", "package.json"
|
19
38
|
end
|
20
39
|
|
21
40
|
if Rails.root.join("Procfile.dev").exist?
|
22
|
-
append_to_file "Procfile.dev", "
|
41
|
+
append_to_file "Procfile.dev", "\ncss: yarn build:css --watch"
|
23
42
|
else
|
24
43
|
say "Add default Procfile.dev"
|
25
44
|
copy_file "#{__dir__}/Procfile.dev", "Procfile.dev"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cssbundling-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Heinemeier Hansson
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2021-09-
|
12
|
+
date: 2021-09-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: railties
|