Skip to content

Commit

Permalink
Enable dev script to use polling
Browse files Browse the repository at this point in the history
* Added optional parameter "p" to enable polling
* Default behavior will remain unchanged
  • Loading branch information
thebub committed Apr 28, 2022
1 parent ef2ca55 commit 1407827
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/install/Procfile.dev
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
web: bin/rails server -p 3000
css: bin/rails tailwindcss:watch
css_polling: bin/rails tailwindcss:poll
16 changes: 15 additions & 1 deletion lib/install/dev
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,18 @@ then
gem install foreman
fi

foreman start -f Procfile.dev
while getopts p: option
do
case "${option}"
in
p)polling=1;;
*);;
esac
done

if [ $polling -eq 1 ]
then
foreman start -f Procfile.dev -m all=1,css=0
else
foreman start -f Procfile.dev -m all=1,css_polling=0
fi

0 comments on commit 1407827

Please sign in to comment.