forked from OpenNeo/impress
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:
parent
6bbef7e75e
commit
421f11143d
2 changed files with 8 additions and 1 deletions
|
@ -11,3 +11,9 @@ bundle install
|
||||||
|
|
||||||
# Set up the databases: create the schema, and load in some default data.
|
# Set up the databases: create the schema, and load in some default data.
|
||||||
bin/rails db:schema:load db:seed
|
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
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
},
|
},
|
||||||
"scripts": {
|
"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",
|
"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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue