Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lib/install/bootstrap/install.rb
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 2 additions & 0 deletions lib/install/bulma/install.rb
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 2 additions & 0 deletions lib/install/postcss/install.rb
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 2 additions & 0 deletions lib/install/sass/install.rb
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 2 additions & 0 deletions lib/install/tailwind/install.rb
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
15 changes: 5 additions & 10 deletions lib/tasks/cssbundling/install.rake
Original file line number Diff line number Diff line change
@@ -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
Expand Down