Skip to content

Commit

Permalink
Fixing on-demand CSS assets compliation (#93)
Browse files Browse the repository at this point in the history
* Fixing on-demand CSS assets compliation

 * Also several minor fixes to other files.

* Update Procfile.dev

* Update package.json

* Update global.css.scss
  • Loading branch information
kigster authored Apr 20, 2024
1 parent 631774b commit 1c774aa
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 7 deletions.
5 changes: 3 additions & 2 deletions Procfile.dev
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# vim: ft=yaml
web: env RUBY_DEBUG_OPEN=true bin/rails server -p 3000
js: yarn watch:js --verbose
css: yarn watch:css --verbose
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: #FB9 !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

0 comments on commit 1c774aa

Please sign in to comment.