Skip to content
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

Fixing on-demand CSS assets compliation #93

Merged
merged 5 commits into from
Apr 20, 2024
Merged
Show file tree
Hide file tree
Changes from 3 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
8 changes: 4 additions & 4 deletions Procfile.dev
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
web: env RUBY_DEBUG_OPEN=true bin/rails server
js: yarn build --watch
css: yarn watch:css
browser: sleep 10 && open http://localhost:5000/ && while true; do sleep 100; echo .; done
# vim: ft=yaml
web: env RUBY_DEBUG_OPEN=true bin/rails server -p 3000
js: yarn watch:js
css: yarn watch:css
browser: sleep 10 && open http://localhost:3000/ && while true; do sleep 100; echo .; done
13 changes: 12 additions & 1 deletion app/assets/stylesheets/global.css.scss
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,22 @@ form {
max-width: 80%;
}

input[type=text]#event_name {
width: 400px !important;
min-width: 400px !important;
font-size: 14pt;
background-color: green !important;
}

input[type=text] {
min-width: 100px;
width: 300px;
text-align: left;
padding-left: 10px;
width: 300px;
}

input[name="event[name]"] {
width: 500px !important;
}

input[type=submit] {
Expand Down
2 changes: 1 addition & 1 deletion app/views/events/_form.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
%fieldset
%legend Event Details
= f.label :name, 'Event Name'
= f.text_field :name, class: 'input-large', required: true, maxlength: Event::MAX_NAME_LENGTH
= f.text_field :name, class: 'event-name', required: true, maxlength: Event::MAX_NAME_LENGTH

= f.label :start_time, 'Start Time'
= render partial: 'shared/datetime_field', locals: {form: f, name: "start_time", datetime: (@event.start_time || 1.day.from_now.beginning_of_day) }
Expand Down
1 change: 0 additions & 1 deletion config/database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ production:
encoding: utf8
host: localhost
port: 5432
pool: 5
username: postgres
password: postgres
database: ticketing_app_production
Expand Down
3 changes: 1 addition & 2 deletions config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
config.public_file_server.headers = { 'Cache-Control' => "public, max-age=#{2.days.to_i}" }
else
config.action_controller.perform_caching = false

config.cache_store = :null_store
end

Expand Down Expand Up @@ -59,7 +58,7 @@
config.active_job.verbose_enqueue_logs = true

# Suppress logger output for asset requests.
config.assets.quiet = true
config.assets.quiet = false

# Raises error for missing translations.
# config.i18n.raise_on_missing_translations = true
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
"dev": "tsc-watch --noClear -p tsconfig.json --onSuccess \"yarn build:js\" --onFailure \"yarn failure:js\"",
"failure:js": "rm ./app/assets/builds/application.js && rm ./app/assets/builds/application.js.map",
"watch:css": "nodemon --watch ./app/assets/stylesheets/ --ext scss --exec \"yarn build:css\"",
"watch:js": "nodemon --watch ./app/javascript/ --ext js --exec \"yarn build:js\"",
"eslint:check": "yarn eslint .",
"prettier:check": "yarn prettier --check ."
},
Expand Down
Loading