cssbundling-rails 1.1.0 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -3
- data/lib/cssbundling/version.rb +1 -1
- data/lib/install/Procfile.dev +1 -1
- data/lib/install/bootstrap/install.rb +8 -4
- data/lib/install/bulma/install.rb +8 -4
- data/lib/install/dev +3 -4
- data/lib/install/postcss/install.rb +7 -3
- data/lib/install/sass/install.rb +8 -4
- data/lib/install/tailwind/install.rb +7 -3
- data/lib/tasks/cssbundling/clobber.rake +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 45868eda1ae67158b652d75c9ad8d89bc55bf67ac62e0539b8a30b91122d0186
|
4
|
+
data.tar.gz: d6b0d91eaf919c44628aa7c9edbdf3a56d3d34e0ace6651dd42aca2091acb30e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 517e8067a0fabc88db726ca0d89c4ec488a3815aef2c6c5cf5e4df254c2706ed6826693610062e4fe0385b3d42688217f46de5005bd8b631b8ba8e8f10720346
|
7
|
+
data.tar.gz: f81ead37fb5b36fbf09a1d8751ae67fbeb3e28d82baa80d177cd0779d8c3bc36ed62b686021ce3fba5cb817f1c431d585346a6e067502e33e3483b283b501b80
|
data/README.md
CHANGED
@@ -21,9 +21,8 @@ You can configure your bundler options in the `build:css` script in `package.jso
|
|
21
21
|
|
22
22
|
You must already have node and yarn installed on your system. You will also need npx version 7.1.0 or later. Then:
|
23
23
|
|
24
|
-
1.
|
25
|
-
2. Run `./bin/
|
26
|
-
3. Run `./bin/rails css:install:[tailwind|bootstrap|bulma|postcss|sass]`
|
24
|
+
1. Run `./bin/bundle add cssbundling-rails`
|
25
|
+
2. Run `./bin/rails css:install:[tailwind|bootstrap|bulma|postcss|sass]`
|
27
26
|
|
28
27
|
Or, in Rails 7+, you can preconfigure your new application to use a specific bundler with `rails new myapp --css [tailwind|bootstrap|bulma|postcss|sass]`.
|
29
28
|
|
@@ -42,6 +41,10 @@ If you want to use `@import` statements as part of your Tailwind application.js
|
|
42
41
|
|
43
42
|
Some CSS packages use new CSS features that are not supported by the default SassC rails integration that previous versions of Rails used. If you hit such an incompatibility, it'll likely be in the form of a `SassC::SyntaxError` when running `assets:precompile`. The fix is to `bundle remove sass-rails` (or `sassc-rails`, if you were using that).
|
44
43
|
|
44
|
+
### Why do I get `application.css not in asset pipeline` in production?
|
45
|
+
|
46
|
+
A common issue is that your repository does not contain the output directory used by the build commands. You must have `app/assets/builds` available. Add the directory with a `.gitkeep` file, and you'll ensure it's available in production.
|
47
|
+
|
45
48
|
## License
|
46
49
|
|
47
50
|
CSS Bundling for Rails is released under the [MIT License](https://opensource.org/licenses/MIT).
|
data/lib/cssbundling/version.rb
CHANGED
data/lib/install/Procfile.dev
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
web: bin/rails server
|
1
|
+
web: unset PORT && bin/rails server
|
2
2
|
css: yarn build:css --watch
|
@@ -17,11 +17,15 @@ else
|
|
17
17
|
end
|
18
18
|
|
19
19
|
say "Add build:css script"
|
20
|
-
build_script = "sass ./app/assets/stylesheets/application.bootstrap.scss
|
20
|
+
build_script = "sass ./app/assets/stylesheets/application.bootstrap.scss:./app/assets/builds/application.css --no-source-map --load-path=node_modules"
|
21
21
|
|
22
|
-
|
23
|
-
|
24
|
-
else
|
22
|
+
case `npx -v`.to_f
|
23
|
+
when 7.1...8.0
|
25
24
|
run %(npm set-script build:css "#{build_script}")
|
26
25
|
run %(yarn build:css)
|
26
|
+
when (8.0..)
|
27
|
+
run %(npm pkg set scripts.build:css="#{build_script}")
|
28
|
+
run %(yarn build:css)
|
29
|
+
else
|
30
|
+
say %(Add "scripts": { "build:css": "#{build_script}" } to your package.json), :green
|
27
31
|
end
|
@@ -4,11 +4,15 @@ copy_file "#{__dir__}/application.bulma.scss",
|
|
4
4
|
run "yarn add sass bulma"
|
5
5
|
|
6
6
|
say "Add build:css script"
|
7
|
-
build_script = "sass ./app/assets/stylesheets/application.bulma.scss
|
7
|
+
build_script = "sass ./app/assets/stylesheets/application.bulma.scss:./app/assets/builds/application.css --no-source-map --load-path=node_modules"
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
else
|
9
|
+
case `npx -v`.to_f
|
10
|
+
when 7.1...8.0
|
12
11
|
run %(npm set-script build:css "#{build_script}")
|
13
12
|
run %(yarn build:css)
|
13
|
+
when (8.0..)
|
14
|
+
run %(npm pkg set scripts.build:css="#{build_script}")
|
15
|
+
run %(yarn build:css)
|
16
|
+
else
|
17
|
+
say %(Add "scripts": { "build:css": "#{build_script}" } to your package.json), :green
|
14
18
|
end
|
data/lib/install/dev
CHANGED
@@ -1,9 +1,8 @@
|
|
1
|
-
#!/usr/bin/env
|
1
|
+
#!/usr/bin/env sh
|
2
2
|
|
3
|
-
if !
|
4
|
-
then
|
3
|
+
if ! gem list foreman -i --silent; then
|
5
4
|
echo "Installing foreman..."
|
6
5
|
gem install foreman
|
7
6
|
fi
|
8
7
|
|
9
|
-
foreman start -f Procfile.dev "$@"
|
8
|
+
exec foreman start -f Procfile.dev "$@"
|
@@ -6,9 +6,13 @@ run "yarn add postcss postcss-cli postcss-nesting autoprefixer"
|
|
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
8
|
|
9
|
-
|
10
|
-
|
11
|
-
else
|
9
|
+
case `npx -v`.to_f
|
10
|
+
when 7.1...8.0
|
12
11
|
run %(npm set-script build:css "#{build_script}")
|
13
12
|
run %(yarn build:css)
|
13
|
+
when (8.0..)
|
14
|
+
run %(npm pkg set scripts.build:css="#{build_script}")
|
15
|
+
run %(yarn build:css)
|
16
|
+
else
|
17
|
+
say %(Add "scripts": { "build:css": "#{build_script}" } to your package.json), :green
|
14
18
|
end
|
data/lib/install/sass/install.rb
CHANGED
@@ -3,11 +3,15 @@ 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
|
-
build_script = "sass ./app/assets/stylesheets/application.sass.scss
|
6
|
+
build_script = "sass ./app/assets/stylesheets/application.sass.scss:./app/assets/builds/application.css --no-source-map --load-path=node_modules"
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
else
|
8
|
+
case `npx -v`.to_f
|
9
|
+
when 7.1...8.0
|
11
10
|
run %(npm set-script build:css "#{build_script}")
|
12
11
|
run %(yarn build:css)
|
12
|
+
when (8.0..)
|
13
|
+
run %(npm pkg set scripts.build:css="#{build_script}")
|
14
|
+
run %(yarn build:css)
|
15
|
+
else
|
16
|
+
say %(Add "scripts": { "build:css": "#{build_script}" } to your package.json), :green
|
13
17
|
end
|
@@ -6,9 +6,13 @@ run "yarn add tailwindcss@latest postcss@latest autoprefixer@latest"
|
|
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 --minify"
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
else
|
9
|
+
case `npx -v`.to_f
|
10
|
+
when 7.1...8.0
|
12
11
|
run %(npm set-script build:css "#{build_script}")
|
13
12
|
run %(yarn build:css)
|
13
|
+
when (8.0..)
|
14
|
+
run %(npm pkg set scripts.build:css="#{build_script}")
|
15
|
+
run %(yarn build:css)
|
16
|
+
else
|
17
|
+
say %(Add "scripts": { "build:css": "#{build_script}" } to your package.json), :green
|
14
18
|
end
|
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: 1.1.
|
4
|
+
version: 1.1.2
|
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: 2022-
|
12
|
+
date: 2022-12-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: railties
|
@@ -75,7 +75,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
75
75
|
- !ruby/object:Gem::Version
|
76
76
|
version: '0'
|
77
77
|
requirements: []
|
78
|
-
rubygems_version: 3.
|
78
|
+
rubygems_version: 3.3.26
|
79
79
|
signing_key:
|
80
80
|
specification_version: 4
|
81
81
|
summary: Bundle and process CSS with Tailwind, Bootstrap, PostCSS, Sass in Rails via
|