diff --git a/lib/install/bootstrap/install.rb b/lib/install/bootstrap/install.rb index bfea9b0..f00991e 100644 --- a/lib/install/bootstrap/install.rb +++ b/lib/install/bootstrap/install.rb @@ -1,6 +1,8 @@ require_relative "../helpers" self.extend Helpers +apply "#{__dir__}/../install.rb" + say "Install Bootstrap with Bootstrap Icons, Popperjs/core and Autoprefixer" copy_file "#{__dir__}/application.bootstrap.scss", "app/assets/stylesheets/application.bootstrap.scss" diff --git a/lib/install/bulma/install.rb b/lib/install/bulma/install.rb index c5276d0..a6de35a 100644 --- a/lib/install/bulma/install.rb +++ b/lib/install/bulma/install.rb @@ -1,6 +1,8 @@ require_relative "../helpers" self.extend Helpers +apply "#{__dir__}/../install.rb" + say "Install Bulma" copy_file "#{__dir__}/application.bulma.scss", "app/assets/stylesheets/application.bulma.scss" diff --git a/lib/install/postcss/install.rb b/lib/install/postcss/install.rb index d9eb5bd..e80280b 100644 --- a/lib/install/postcss/install.rb +++ b/lib/install/postcss/install.rb @@ -1,6 +1,8 @@ require_relative "../helpers" self.extend Helpers +apply "#{__dir__}/../install.rb" + say "Install PostCSS w/ nesting and autoprefixer" copy_file "#{__dir__}/postcss.config.js", "postcss.config.js" copy_file "#{__dir__}/application.postcss.css", "app/assets/stylesheets/application.postcss.css" diff --git a/lib/install/sass/install.rb b/lib/install/sass/install.rb index 692d60e..b05a8e5 100644 --- a/lib/install/sass/install.rb +++ b/lib/install/sass/install.rb @@ -1,6 +1,8 @@ require_relative "../helpers" self.extend Helpers +apply "#{__dir__}/../install.rb" + say "Install Sass" copy_file "#{__dir__}/application.sass.scss", "app/assets/stylesheets/application.sass.scss" run "#{bundler_cmd} add sass" diff --git a/lib/install/tailwind/install.rb b/lib/install/tailwind/install.rb index 7374ff4..f8e530d 100644 --- a/lib/install/tailwind/install.rb +++ b/lib/install/tailwind/install.rb @@ -1,6 +1,8 @@ require_relative "../helpers" self.extend Helpers +apply "#{__dir__}/../install.rb" + say "Install Tailwind (+PostCSS w/ autoprefixer)" copy_file "#{__dir__}/tailwind.config.js", "tailwind.config.js" copy_file "#{__dir__}/application.tailwind.css", "app/assets/stylesheets/application.tailwind.css" diff --git a/lib/tasks/cssbundling/install.rake b/lib/tasks/cssbundling/install.rake index d093d8d..ba1df4c 100644 --- a/lib/tasks/cssbundling/install.rake +++ b/lib/tasks/cssbundling/install.rake @@ -1,32 +1,27 @@ namespace :css do namespace :install do - desc "Install shared elements for all bundlers" - task :shared do - system "#{RbConfig.ruby} ./bin/rails app:template LOCATION=#{File.expand_path("../../install/install.rb", __dir__)}" - end - desc "Install Tailwind" - task tailwind: "css:install:shared" do + task :tailwind do system "#{RbConfig.ruby} ./bin/rails app:template LOCATION=#{File.expand_path("../../install/tailwind/install.rb", __dir__)}" end desc "Install PostCSS" - task postcss: "css:install:shared" do + task :postcss do system "#{RbConfig.ruby} ./bin/rails app:template LOCATION=#{File.expand_path("../../install/postcss/install.rb", __dir__)}" end desc "Install Sass" - task sass: "css:install:shared" do + task :sass do system "#{RbConfig.ruby} ./bin/rails app:template LOCATION=#{File.expand_path("../../install/sass/install.rb", __dir__)}" end desc "Install Bootstrap" - task bootstrap: "css:install:shared" do + task :bootstrap do system "#{RbConfig.ruby} ./bin/rails app:template LOCATION=#{File.expand_path("../../install/bootstrap/install.rb", __dir__)}" end desc "Install Bulma" - task bulma: "css:install:shared" do + task :bulma do system "#{RbConfig.ruby} ./bin/rails app:template LOCATION=#{File.expand_path("../../install/bulma/install.rb", __dir__)}" end end