Swtich from foreman to concurrently for yarn start

trunk
Matt Brictson 3 years ago
parent 495fb148f1
commit 0bc4057ade
No known key found for this signature in database
GPG Key ID: 2F279EAD1F2ACFAF

@ -1,3 +0,0 @@
web: bin/rails s -b 0.0.0.0
webpack: bin/webpack-dev-server
worker: bin/sidekiq

@ -28,7 +28,6 @@ def apply_template!
copy_file "Guardfile"
copy_file "Procfile"
copy_file "Procfile.dev"
apply "Rakefile.rb"
apply "config.ru.rb"
@ -58,7 +57,7 @@ def apply_template!
template "prettierrc.js", ".prettierrc.js"
template "stylelintrc.js", ".stylelintrc.js"
add_yarn_lint_and_run_fix
add_foreman_start_script
add_yarn_start_script
unless any_local_git_commits?
git checkout: "-b main"
@ -194,9 +193,11 @@ def create_database_and_initial_migration
run_with_clean_bundler_env "bin/rails generate migration initial_migration"
end
def add_foreman_start_script
run_with_clean_bundler_env "yarn add --dev foreman"
add_package_json_script(start: "nf start -p 3000 -j Procfile.dev")
def add_yarn_start_script
run_with_clean_bundler_env "yarn add --dev concurrently"
add_package_json_script(
start: "concurrently --raw --kill-others-on-fail 'bin/rails s -b 0.0.0.0' 'bin/webpack-dev-server' 'bin/sidekiq'"
)
end
def add_yarn_lint_and_run_fix

Loading…
Cancel
Save