Build wardrobe-2020 JS during dev container setup

Oh yeah right, let's `yarn install` and build as part of the `post-create.sh` script!

I didn't have a command to do a one-time dev build of the assets yet (just one-time prod, or dev with reloading), so I added `yarn build:dev`!
This commit is contained in:
Emi Matchu 2023-10-26 21:39:42 +00:00
parent 6bbef7e75e
commit 421f11143d
2 changed files with 8 additions and 1 deletions

View File

@ -11,3 +11,9 @@ bundle install
# Set up the databases: create the schema, and load in some default data.
bin/rails db:schema:load db:seed
# Install the app's JS dependencies.
yarn install
# Run a first-time build of the app's JS, in development mode.
yarn build:dev

View File

@ -31,6 +31,7 @@
},
"scripts": {
"build": "esbuild app/javascript/*.* --bundle --sourcemap --outdir=app/assets/builds --public-path=/assets --asset-names=[name]-[hash].digested --loader:.js=jsx --loader:.png=file --loader:.svg=file --loader:.min.js=text",
"dev": "yarn build --watch --public-path=/dev-assets"
"build:dev": "yarn build --public-path=/dev-assets",
"dev": "yarn build:dev --watch"
}
}