cssbundling-rails 0.2.0 → 0.2.4
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/lib/cssbundling/version.rb +1 -1
- data/lib/install/bootstrap/install.rb +7 -1
- data/lib/install/bulma/install.rb +7 -1
- data/lib/install/install.rb +4 -4
- data/lib/install/postcss/install.rb +9 -3
- data/lib/install/postcss/postcss.config.js +2 -6
- data/lib/install/sass/install.rb +7 -1
- data/lib/install/tailwind/install.rb +7 -1
- data/lib/tasks/cssbundling/build.rake +3 -1
- metadata +2 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2327f824df0a60b8114f3834b29a7d20b005bb2645d98083772ca1fa622b8d8c
|
4
|
+
data.tar.gz: 1bf817470b20cbe122c67a3b502ebdea182a7c526073b0059f05b6c262af5203
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c01ddba4ef303e6a03f59480709003950deeaad59238d7afd974009fa18914e872be4aa19ddd2ba7c976124bc06aad5f3fc6016e98672b4162feed7016e06826
|
7
|
+
data.tar.gz: cd093d2443110526f411698cbbabab0e222e3c81221f6a95139a04ef8bd0197d70de9a27aa8081ae3010e33888e1e5207c2bd693fa7a4bc1b70c432bd6af66b3
|
data/lib/cssbundling/version.rb
CHANGED
@@ -11,4 +11,10 @@ else
|
|
11
11
|
end
|
12
12
|
|
13
13
|
say "Add build:css script"
|
14
|
-
|
14
|
+
build_script = "sass ./app/assets/stylesheets/application.bootstrap.scss ./app/assets/builds/application.css --no-source-map --load-path=node_modules"
|
15
|
+
|
16
|
+
if (`npx -v`.to_f < 7.1 rescue "Missing")
|
17
|
+
say %(Add "scripts": { "build:css": "#{build_script}" to your package.json), :green
|
18
|
+
else
|
19
|
+
run %(npm set-script build:css "#{build_script}")
|
20
|
+
end
|
@@ -4,4 +4,10 @@ copy_file "#{__dir__}/application.bulma.scss",
|
|
4
4
|
run "yarn add sass bulma"
|
5
5
|
|
6
6
|
say "Add build:css script"
|
7
|
-
|
7
|
+
build_script = "sass ./app/assets/stylesheets/application.bulma.scss ./app/assets/builds/application.css --no-source-map --load-path=node_modules"
|
8
|
+
|
9
|
+
if (`npx -v`.to_f < 7.1 rescue "Missing")
|
10
|
+
say %(Add "scripts": { "build:css": "#{build_script}" to your package.json), :green
|
11
|
+
else
|
12
|
+
run %(npm set-script build:css "#{build_script}")
|
13
|
+
end
|
data/lib/install/install.rb
CHANGED
@@ -4,10 +4,10 @@ keep_file "app/assets/builds"
|
|
4
4
|
|
5
5
|
if (sprockets_manifest_path = Rails.root.join("app/assets/config/manifest.js")).exist?
|
6
6
|
append_to_file sprockets_manifest_path, %(//= link_tree ../builds\n)
|
7
|
-
end
|
8
7
|
|
9
|
-
say "Stop linking stylesheets automatically"
|
10
|
-
gsub_file "app/assets/config/manifest.js", "//= link_directory ../stylesheets .css\n", ""
|
8
|
+
say "Stop linking stylesheets automatically"
|
9
|
+
gsub_file "app/assets/config/manifest.js", "//= link_directory ../stylesheets .css\n", ""
|
10
|
+
end
|
11
11
|
|
12
12
|
if Rails.root.join(".gitignore").exist?
|
13
13
|
append_to_file(".gitignore", %(\n/app/assets/builds/*\n!/app/assets/builds/.keep\n))
|
@@ -46,7 +46,7 @@ else
|
|
46
46
|
say "Add default Procfile.dev"
|
47
47
|
copy_file "#{__dir__}/Procfile.dev", "Procfile.dev"
|
48
48
|
|
49
|
-
say "Ensure foreman is
|
49
|
+
say "Ensure foreman is installed"
|
50
50
|
run "gem install foreman"
|
51
51
|
end
|
52
52
|
|
@@ -1,7 +1,13 @@
|
|
1
|
-
say "Install PostCSS w/
|
1
|
+
say "Install PostCSS w/ nesting and autoprefixer"
|
2
2
|
copy_file "#{__dir__}/postcss.config.js", "postcss.config.js"
|
3
3
|
copy_file "#{__dir__}/application.postcss.css", "app/assets/stylesheets/application.postcss.css"
|
4
|
-
run "yarn add postcss postcss-cli postcss-
|
4
|
+
run "yarn add postcss postcss-cli postcss-nesting autoprefixer"
|
5
5
|
|
6
6
|
say "Add build:css script"
|
7
|
-
|
7
|
+
build_script = "postcss ./app/assets/stylesheets/application.postcss.css -o ./app/assets/builds/application.css"
|
8
|
+
|
9
|
+
if (`npx -v`.to_f < 7.1 rescue "Missing")
|
10
|
+
say %(Add "scripts": { "build:css": "#{build_script}" to your package.json), :green
|
11
|
+
else
|
12
|
+
run %(npm set-script build:css "#{build_script}")
|
13
|
+
end
|
data/lib/install/sass/install.rb
CHANGED
@@ -3,4 +3,10 @@ copy_file "#{__dir__}/application.sass.scss", "app/assets/stylesheets/applicatio
|
|
3
3
|
run "yarn add sass"
|
4
4
|
|
5
5
|
say "Add build:css script"
|
6
|
-
|
6
|
+
build_script = "sass ./app/assets/stylesheets/application.sass.scss ./app/assets/builds/application.css --no-source-map --load-path=node_modules"
|
7
|
+
|
8
|
+
if (`npx -v`.to_f < 7.1 rescue "Missing")
|
9
|
+
say %(Add "scripts": { "build:css": "#{build_script}" to your package.json), :green
|
10
|
+
else
|
11
|
+
run %(npm set-script build:css "#{build_script}")
|
12
|
+
end
|
@@ -4,4 +4,10 @@ copy_file "#{__dir__}/application.tailwind.css", "app/assets/stylesheets/applica
|
|
4
4
|
run "yarn add tailwindcss@latest postcss@latest autoprefixer@latest"
|
5
5
|
|
6
6
|
say "Add build:css script"
|
7
|
-
|
7
|
+
build_script = "tailwindcss -i ./app/assets/stylesheets/application.tailwind.css -o ./app/assets/builds/application.css"
|
8
|
+
|
9
|
+
if (`npx -v`.to_f < 7.1 rescue "Missing")
|
10
|
+
say %(Add "scripts": { "build:css": "#{build_script}" to your package.json), :green
|
11
|
+
else
|
12
|
+
run %(npm set-script build:css "#{build_script}")
|
13
|
+
end
|
@@ -1,7 +1,9 @@
|
|
1
1
|
namespace :css do
|
2
2
|
desc "Build your CSS bundle"
|
3
3
|
task :build do
|
4
|
-
system "yarn install && yarn build:css"
|
4
|
+
unless system "yarn install && yarn build:css"
|
5
|
+
raise "cssbundling-rails: Command css:build failed, ensure yarn is installed and `yarn build:css` runs without errors"
|
6
|
+
end
|
5
7
|
end
|
6
8
|
end
|
7
9
|
|
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.2.
|
4
|
+
version: 0.2.4
|
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-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: railties
|
@@ -25,20 +25,6 @@ dependencies:
|
|
25
25
|
- - ">="
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
version: 6.0.0
|
28
|
-
- !ruby/object:Gem::Dependency
|
29
|
-
name: sprockets-rails
|
30
|
-
requirement: !ruby/object:Gem::Requirement
|
31
|
-
requirements:
|
32
|
-
- - ">="
|
33
|
-
- !ruby/object:Gem::Version
|
34
|
-
version: 2.0.0
|
35
|
-
type: :runtime
|
36
|
-
prerelease: false
|
37
|
-
version_requirements: !ruby/object:Gem::Requirement
|
38
|
-
requirements:
|
39
|
-
- - ">="
|
40
|
-
- !ruby/object:Gem::Version
|
41
|
-
version: 2.0.0
|
42
28
|
description:
|
43
29
|
email: david@loudthinking.com
|
44
30
|
executables: []
|