Skip to content
This repository was archived by the owner on Feb 15, 2022. It is now read-only.

Implement ocaml wrapper around ReScript watch #297

Closed
ghost opened this issue Apr 21, 2021 · 3 comments
Closed

Implement ocaml wrapper around ReScript watch #297

ghost opened this issue Apr 21, 2021 · 3 comments

Comments

@ghost
Copy link

ghost commented Apr 21, 2021

We want commands to run before ReScript watch runs and after ReScript watch completes. The commands can use inotify wait to identify when to run, and can run ReScript build directly, instead of using ReScript watch. We might also want to control when next dev starts running.

#140 Generating pages will run after a ReScript build.

We will add a global.yaml data file and we want an ocaml process to convert this data into a globals ReScript module. This should occur before ReScript build runs.

This issue is related to #13.

This comment (#245 (comment)) may also be useful when thinking about the goals for this task.

@ghost ghost self-assigned this Apr 21, 2021
@ghost
Copy link
Author

ghost commented Apr 21, 2021

In an ideal world, all the libraries we need would be available in ocaml, and the processing before ReScript build would produce ReScript modules with data and getStaticProps would consist of solely referencing the produced data. Ocaml would perform all the fetching and transforming, ReScript would only perform html rendering in react components.

@agarwal agarwal unassigned ghost Apr 22, 2021
@ghost
Copy link
Author

ghost commented May 1, 2021

Although this additional task does not need to be done at the same time, it would be nice to swap in https://github.com/hashicorp/next-remote-watch for next dev, as part of working on this issue.

@ghost
Copy link
Author

ghost commented May 7, 2021

I came up with a way to avoid #140. I don't think it's worth wrapping ReScript watch for the other noted feature (converting global data from yaml to ReScript constants). I am closing this for now.

@ghost ghost closed this as completed May 7, 2021
@ghost ghost added the wontfix label May 7, 2021
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants