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

build.rs that builds the frontend too #7

Closed
trevyn opened this issue Aug 29, 2021 · 2 comments
Closed

build.rs that builds the frontend too #7

trevyn opened this issue Aug 29, 2021 · 2 comments
Milestone

Comments

@trevyn
Copy link
Owner

trevyn commented Aug 29, 2021

Make sure npm install is run if no node_modules and do an npm run build.

@trevyn trevyn added this to the 0.1 milestone Aug 29, 2021
@trevyn
Copy link
Owner Author

trevyn commented Aug 30, 2021

Looks like this is going to be challenging due to rust-lang/cargo#6412

Maybe just have build.rs make sure that frontend/node_modules and frontend/src/turbocharger_generated are present (and up to date??) and if there's any issues, error the build with advice.

Or use a separate build script and have a plain cargo build fail with advice to use the build script.

Or just use npm run build npm run dev npm run watch etc. and have a build.rs that errors out and suggests these if everything is not installed and up to date (e.g. by checking mod times on turbocharger_generated etc.

@trevyn
Copy link
Owner Author

trevyn commented Aug 31, 2021

Just using npm now.

@trevyn trevyn closed this as completed Aug 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant