github.com/cockroachdb/cockroach@v20.2.0-alpha.1+incompatible/pkg/ui/opt/README.md (about) 1 # ui/opt 2 3 This directory is a home for UI dependencies that are not essential to building 4 a working UI or running the UI tests. Since all contributors are required to 5 build the UI from scratch, limiting the number of dependencies in the pipeline, 6 especially heavyweight dependencies, minimizes the burden of the UI build on 7 non-UI developers. Make will run `yarn install` in this directory only when 8 necessary. 9 10 A rough rule of thumb for whether a UI dependency is essential is to ask whether 11 `make generate` or `make test` from within the UI requires the dependency. At 12 the time of writing, the only package that fails this test is 13 [webpack-dashboard], which displays Webpack build status in a handy terminal 14 user interface, complete with a progress bar. Though this might be useful to 15 non-UI developers, it depends on a package that compiles SQLite from source, 16 which is rather a lot to ask. 17 18 If the UI dependencies balloon, we can further separate the dependencies 19 required to run `make test` from the dependencies required to run `make 20 generate`. Each stratum adds build system complexity and duplicates shared 21 transitive dependencies, so we're only separating into essential and 22 non-essential dependencies to start. 23 24 [webpack-dashboard]: https://github.com/FormidableLabs/webpack-dashboard