fcacec90a5
We need a way to load certain CSS based on the environment you are viewing, i.e. we have debug CSS that we use for our Eng Documentation and various other DX utilities that shouldn't be compiled into our production or test builds. Previously we would compile two entirely different CSS files (app and debug) and the load one or the other depending on which environment you were in. This approach just empties out the debug.css file in certain environments (prod/test) which means we can just import that file from app. When in staging/development this imports the contents of debug.css (quite a bit of CSS) whereas when building for production/test this debug.css is emptied out during the build process. There is a slight little hack in order to have this work, we import _debug.scss which imports the debug.scss file. I couldn't for the life of me figure out how to have broccoli empty out a file during the build process, so instead we essentially copy over debug.scss during dev and create an empty file during prod to _debug.scss. When using make build to build an artifact for production CSS remains at ~58kb (during dev its a lot bigger than this) |
||
---|---|---|
.. | ||
packages | ||
.gitignore | ||
GNUmakefile | ||
README.md | ||
package.json | ||
vercel.json | ||
yarn.lock |
README.md
Consul UI Monorepo
This monorepo contains multiple projects, the UI for Consul and addons and packages used by the UI.
This top-level repository provides limited common tasks, such as installation and commit assistance. However, most tasks must be executed from within a subproject, e.g. running or testing.
If you are looking to work on the Consul UI you probably want to read
the README that is in ./packages/consul-ui/README.md
.
Table of Contents generated with DocToc
Prerequisites
You will need the following things properly installed on your computer.
- Git
- Node.js
- Yarn installed globally
- Google Chrome
- Firefox
Installation
git clone https://github.com/hashicorp/consul.git
this repositorycd ui
yarn
Yarn Commands
List of available project commands. yarn run <command-name>
Command | Description |
---|---|
doc:toc | Re-builds the ToC for this README. |
compliance:licenses | Checks that all dependencies have OSS-compatible licenses. |
Contributing
Building ToC
To autogenerate a ToC (table of contents) for this README,
run yarn doc:toc
. Please update the ToC whenever editing the structure
of README.