openlaw-client icon indicating copy to clipboard operation
openlaw-client copied to clipboard

clean up JS build sytem (details TBD)

Open outkaj opened this issue 5 years ago • 4 comments

As mroth mentioned, right now the JS build system is very difficult to reason about as we have a few overlapping tools with complex rulesets. We should clean this up.

For example, it's possible (and even likely) that we may not need to use both rollup and webpack, since they have overlapping functionality.

outkaj avatar May 02 '19 13:05 outkaj

As it is, we currently have 3 different things managing transform rules in the build:

  • some manual npm "shell" scripts that have the notion of dependencies built in via recursively calling other npm scripts (see build:esm)
  • rollup
  • webpack, which appears to duplicate some of the above two, but is used when folks run in --watch mode?

Both webpack/rollup can do watch vs builds, so it would be good to consolidate this, and get the npm script rules into the same configs.

In addition, this would ideally be done with #48 in mind -- e.g. having "already up to date" file awareness for build transforms, as currently the JS section of the build can take upwards of 5-8 minutes on a slower machine, and the entire thing is redone every time.

mroth avatar May 02 '19 13:05 mroth

@jtrein we'd love your help with this project whenever you're looking for a new task

outkaj avatar May 02 '19 16:05 outkaj

Would love to. I am busy with web worker things right now, but I will definitely look into this.

Nothing's been done on this, yet, correct? There is some discussion happening in the client's Slack channel, but it is about just getting the build to be containerized and working, before we optimize what is mentioned in this issue?

jtrein avatar May 06 '19 06:05 jtrein

Nothing's been done on this, yet, correct? There is some discussion happening in the client's Slack channel, but it is about just getting the build to be containerized and working, before we optimize what is mentioned in this issue?

Correct. There have been some minor edits made just around getting things working, but the overall build system consolidation question was punted on so we can discuss and design when convenient.

mroth avatar May 06 '19 15:05 mroth