Skip to content

Commit 4daa214

Browse files
committed
bin/rails tailwindcss:install
1 parent 1276689 commit 4daa214

File tree

7 files changed

+27
-3
lines changed

7 files changed

+27
-3
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,6 @@
3535
/config/master.key
3636

3737
/coverage
38+
39+
/app/assets/builds/*
40+
!/app/assets/builds/.keep

Procfile.dev

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
web: bin/rails server
2+
css: bin/rails tailwindcss:watch

app/assets/builds/.keep

Whitespace-only changes.

app/assets/config/manifest.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
//= link_tree ../images
22
//= link_directory ../stylesheets .css
3+
//= link_tree ../builds
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@import "tailwindcss";

app/views/layouts/application.html.erb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,14 @@
1111
<meta name="viewport" content="width=device-width,initial-scale=1">
1212
<%= csrf_meta_tags %>
1313
<%= csp_meta_tag %>
14+
<%= stylesheet_link_tag "tailwind", "data-turbo-track": "reload" %>
1415

1516
<%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
1617
</head>
1718

1819
<body>
19-
<%= yield %>
20+
<main class="container mx-auto mt-28 px-5 flex">
21+
<%= yield %>
22+
</main>
2023
</body>
2124
</html>

bin/dev

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,16 @@
1-
#!/usr/bin/env ruby
2-
exec "./bin/rails", "server", *ARGV
1+
#!/usr/bin/env sh
2+
3+
if ! gem list foreman -i --silent; then
4+
echo "Installing foreman..."
5+
gem install foreman
6+
fi
7+
8+
# Default to port 3000 if not specified
9+
export PORT="${PORT:-3000}"
10+
11+
# Let the debug gem allow remote connections,
12+
# but avoid loading until `debugger` is called
13+
export RUBY_DEBUG_OPEN="true"
14+
export RUBY_DEBUG_LAZY="true"
15+
16+
exec foreman start -f Procfile.dev "$@"

0 commit comments

Comments
 (0)