cssbundling-rails 1.3.0 → 1.3.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: 80c2c969114694a1020f70a4f5025ddaaddd9814c802646e768631942a1adbdf
4
- data.tar.gz: d5a828cf779270bf0f05257fcc2e9ee33fbbae7b23e5f668bcad26779a0131f0
3
+ metadata.gz: 643412ab70b4a60ccf019381db175e18fb2e779c34439cf89c19d0caa3a8dfd5
4
+ data.tar.gz: 80888732e4252b4e59ef90843010ef5dd6cf3e395c72ea8d2539c27557752dec
5
5
  SHA512:
6
- metadata.gz: a42545bdef51ea41c6c386067a643a84c862fe996b0f1d519891ada561db3ad067796a66172ee628bcfc993540644529dfda0c6b938410a121d727c04e111ada
7
- data.tar.gz: 1ed4b170f44f51e8db2d04e7d963702bacef1eab17099eac42a9df6166f1aa4ad480b60caa11437973e219ab1c35c3a6292eb08252db42ccf26c88ddc08ac4bb
6
+ metadata.gz: a14d2636c1b596f6cd4106c9214b1963f1f5e65329b3beaa27557de5dbfa6e57dcb9c688130e11ce75fc68a823fad74fddc3e3a14557e1fa6d3e663dc22a05a1
7
+ data.tar.gz: 687cd595a551a1feef7279fe59ff8a6a4c623e00c35b33aeb4a3dc13259f89f548e8a6ece4d1c7d727cedb71dd3feb88f4a8577278eba825f1074d6606286185
@@ -1,3 +1,3 @@
1
1
  module Cssbundling
2
- VERSION = "1.3.0"
2
+ VERSION = "1.3.2"
3
3
  end
@@ -47,7 +47,7 @@ if Rails.root.join("Procfile.dev").exist?
47
47
  append_to_file "Procfile.dev", "css: #{bundler_run_cmd} build:css --watch\n"
48
48
  else
49
49
  say "Add default Procfile.dev"
50
- copy_file "#{__dir__}/#{using_bun? ? "Procfile_for_bun" : "Procfile_for_node"}", "Procfile.dev"
50
+ copy_file "#{__dir__}/#{using_bun? ? "Procfile_for_bun.dev" : "Procfile_for_node.dev"}", "Procfile.dev"
51
51
 
52
52
  say "Ensure foreman is installed"
53
53
  run "gem install foreman"
@@ -1,7 +1,7 @@
1
1
  namespace :css do
2
2
  desc "Install JavaScript dependencies"
3
3
  task :install do
4
- command = install_command
4
+ command = Cssbundling::Tasks.install_command
5
5
  unless system(command)
6
6
  raise "cssbundling-rails: Command install failed, ensure #{command.split.first} is installed"
7
7
  end
@@ -9,7 +9,7 @@ namespace :css do
9
9
 
10
10
  desc "Build your CSS bundle"
11
11
  build_task = task :build do
12
- command = build_command
12
+ command = Cssbundling::Tasks.build_command
13
13
  unless system(command)
14
14
  raise "cssbundling-rails: Command build failed, ensure `#{command}` runs without errors"
15
15
  end
@@ -17,20 +17,26 @@ namespace :css do
17
17
  build_task.prereqs << :install unless ENV["SKIP_YARN_INSTALL"] || ENV["SKIP_BUN_INSTALL"]
18
18
  end
19
19
 
20
- def install_command
21
- return "bun install" if File.exist?('bun.lockb') || (tool_exists?('bun') && !File.exist?('yarn.lock'))
22
- return "yarn install" if File.exist?('yarn.lock') || tool_exists?('yarn')
23
- raise "cssbundling-rails: No suitable tool found for installing JavaScript dependencies"
24
- end
20
+ module Cssbundling
21
+ module Tasks
22
+ extend self
25
23
 
26
- def build_command
27
- return "bun run build:css" if File.exist?('bun.lockb') || (tool_exists?('bun') && !File.exist?('yarn.lock'))
28
- return "yarn build:css" if File.exist?('yarn.lock') || tool_exists?('yarn')
29
- raise "cssbundling-rails: No suitable tool found for building CSS"
30
- end
24
+ def install_command
25
+ return "bun install" if File.exist?('bun.lockb') || (tool_exists?('bun') && !File.exist?('yarn.lock'))
26
+ return "yarn install" if File.exist?('yarn.lock') || tool_exists?('yarn')
27
+ raise "cssbundling-rails: No suitable tool found for installing JavaScript dependencies"
28
+ end
31
29
 
32
- def tool_exists?(tool)
33
- system "command -v #{tool} > /dev/null"
30
+ def build_command
31
+ return "bun run build:css" if File.exist?('bun.lockb') || (tool_exists?('bun') && !File.exist?('yarn.lock'))
32
+ return "yarn build:css" if File.exist?('yarn.lock') || tool_exists?('yarn')
33
+ raise "cssbundling-rails: No suitable tool found for building CSS"
34
+ end
35
+
36
+ def tool_exists?(tool)
37
+ system "command -v #{tool} > /dev/null"
38
+ end
39
+ end
34
40
  end
35
41
 
36
42
  unless ENV["SKIP_CSS_BUILD"]
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.3.0
4
+ version: 1.3.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: 2023-09-12 00:00:00.000000000 Z
12
+ date: 2023-09-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties