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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d009b77062edc08fa7e499ebe915ca706a3c8245e1437f78e5f5fa7bb2829426
4
- data.tar.gz: 7936295528cee5b579b2a0ff6c2b928dd3626bfbfd4e056f03819ff71fa3dd46
3
+ metadata.gz: aca8e582aaa7610a44dbd408daab95d8d88060eda9bb2cc8b8ccaec933bc265f
4
+ data.tar.gz: 00305b7cfe9ae0c757affe7cc015b7a39757931b16fbb36d5a4b893de047bb4f
5
5
  SHA512:
6
- metadata.gz: 1e5651b29b1fc938881fcc0dfa05db4bebb8333fab87febfdb5036dd5915eff9d2e24dfa5cbfc30062e76930598c018f77fe67af2d349f078b833da38657ead4
7
- data.tar.gz: 8646a47e848a271ccf001768e1bdd2b58076096b6dabe29031a4a1464d448b37db4803dd06eef98268710e6a86ce7d6ab088d520f11559c087a8664157bd48a6
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 `<%= stylesheet_include_tag "application" %>`.
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
 
@@ -1,3 +1,3 @@
1
1
  module Cssbundling
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
@@ -0,0 +1,2 @@
1
+ web: bin/rails server
2
+ css: yarn build:css --watch
data/lib/install/dev ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env bash
2
+
3
+ foreman start -f Procfile.dev
@@ -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.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-07 00:00:00.000000000 Z
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