Skip to content

Fixes #252 windows support for dev command and foreman proc file #255

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
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
12 changes: 12 additions & 0 deletions lib/install/dev.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
@echo off

set gem_installed=

for /f "delims=" %%a in ('gem list foreman -i') do @set gem_installed=%%a

if %gem_installed%==false (
echo "Installing foreman..."
gem install foreman
)

foreman start -f Procfile.dev %*
8 changes: 7 additions & 1 deletion lib/install/tailwindcss.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,15 @@
end

if Rails.root.join("Procfile.dev").exist?
append_to_file "Procfile.dev", "css: bin/rails tailwindcss:watch\n"
unless Gem.win_platform?
append_to_file "Procfile.dev", "css: bin/rails tailwindcss:watch\n"
else
append_to_file "Procfile.dev", "css: ruby bin/rails tailwindcss:watch\n"
end
else
say "Add default Procfile.dev"
copy_file "#{__dir__}/Procfile.dev", "Procfile.dev"
gsub_file "Procfile.dev", /bin\/rails/, "ruby bin/rails" if Gem.win_platform?

say "Ensure foreman is installed"
run "gem install foreman"
Expand All @@ -51,6 +56,7 @@
say "Add bin/dev to start foreman"
copy_file "#{__dir__}/dev", "bin/dev"
chmod "bin/dev", 0755, verbose: false
copy_file "#{__dir__}/dev.bat", "bin/dev.bat" if Gem.win_platform?

say "Compile initial Tailwind build"
run "rails tailwindcss:build"