cssbundling-rails 0.1.1 → 0.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 +1 -1
- data/lib/cssbundling/version.rb +1 -1
- data/lib/install/Procfile.dev +2 -0
- data/lib/install/dev +3 -0
- data/lib/install/install.rb +13 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aca8e582aaa7610a44dbd408daab95d8d88060eda9bb2cc8b8ccaec933bc265f
|
4
|
+
data.tar.gz: 00305b7cfe9ae0c757affe7cc015b7a39757931b16fbb36d5a4b893de047bb4f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e773ff5211c1bde8d03a6c00a35a247aecce1b86bfc916252229e124314a5cb7eb1095141b52b2f698d7ad473fd0fb0eb6a2bc1fb3270faf4760139ab17075b8
|
7
|
+
data.tar.gz: fac48a58f322ba87dcd70d30640299bf6dcdd303979a279d4b87df99cb53293d863d7ffb3b58a3696982e31237c437140709b9a155ce83451808ee0fd12a91f1
|
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Use [Tailwind CSS](https://tailwindcss.com), [PostCSS](https://postcss.org), or [Dart Sass](https://sass-lang.com/) to bundle and process your CSS, then deliver it via the asset pipeline in Rails. This gem provides installers to get you going with the bundler of your choice in a new Rails application, and a convention to use `app/assets/builds` to hold your bundled output as artifacts that are not checked into source control (the installer adds this directory to `.gitignore` by default).
|
4
4
|
|
5
|
-
You develop using this approach by running the bundler in watch mode in a terminal with `yarn build:css --watch` (and your Rails server in another, if you're not using something like [puma-dev](https://github.com/puma/puma-dev)). Whenever the bundler detects changes to any of the stylesheet files in your project, it'll bundle `app/assets/stylesheets/application.[bundler].css` into `app/assets/builds/application.css`. This build output takes over from the regular asset pipeline default file. So you continue to refer to the build output in your layout using the standard asset pipeline approach with `<%=
|
5
|
+
You develop using this approach by running the bundler in watch mode in a terminal with `yarn build:css --watch` (and your Rails server in another, if you're not using something like [puma-dev](https://github.com/puma/puma-dev)). Whenever the bundler detects changes to any of the stylesheet files in your project, it'll bundle `app/assets/stylesheets/application.[bundler].css` into `app/assets/builds/application.css`. This build output takes over from the regular asset pipeline default file. So you continue to refer to the build output in your layout using the standard asset pipeline approach with `<%= stylesheet_link_tag "application" %>`.
|
6
6
|
|
7
7
|
When you deploy your application to production, the `css:build` task attaches to the `assets:precompile` task to ensure that all your package dependencies from `package.json` have been installed via yarn, and then runs `yarn build:css` to process your stylesheet entrypoint, as it would in development. This output is then picked up by the asset pipeline, digested, and copied into public/assets, as any other asset pipeline file.
|
8
8
|
|
data/lib/cssbundling/version.rb
CHANGED
data/lib/install/dev
ADDED
data/lib/install/install.rb
CHANGED
@@ -14,3 +14,16 @@ unless Rails.root.join("package.json").exist?
|
|
14
14
|
say "Add default package.json"
|
15
15
|
copy_file "#{__dir__}/package.json", "package.json"
|
16
16
|
end
|
17
|
+
|
18
|
+
if Rails.root.join("Procfile.dev").exist?
|
19
|
+
append_to_file "Procfile.dev", "css: yarn build:css --watch"
|
20
|
+
else
|
21
|
+
say "Add default Procfile.dev"
|
22
|
+
copy_file "#{__dir__}/Procfile.dev", "Procfile.dev"
|
23
|
+
|
24
|
+
say "Ensure foreman is install"
|
25
|
+
run "gem install foreman"
|
26
|
+
end
|
27
|
+
|
28
|
+
say "Add bin/dev to start foreman"
|
29
|
+
copy_file "#{__dir__}/dev", "bin/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.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: 2021-09-
|
12
|
+
date: 2021-09-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -36,6 +36,8 @@ files:
|
|
36
36
|
- lib/cssbundling-rails.rb
|
37
37
|
- lib/cssbundling/engine.rb
|
38
38
|
- lib/cssbundling/version.rb
|
39
|
+
- lib/install/Procfile.dev
|
40
|
+
- lib/install/dev
|
39
41
|
- lib/install/install.rb
|
40
42
|
- lib/install/package.json
|
41
43
|
- lib/install/postcss/application.postcss.css
|