NOTICE: this is a vue3 based design system, if you're working with a vue2 based micro-frontend, please see EnergySage/es-ds-legacy instead
This is a monorepo containing the elements required for building experiences following the EnergySage Design System, or es-ds for short.
This repository es-ds
is public and the contents are licensed under the
MIT
For that reason discussion and documentation specific to EnergySage should probably be kept within private org channels.
For EnergySage specific resources & channels see the Quick Links section of the Design System confluence page
Starting in version 3.0, the EnergySage Design System is composed of 2 core npm packages:
graph TB
subgraph es-ds
subgraph "@energysage"
A["@energysage/es-ds-styles"]
C["@energysage/es-ds-components"]
end
D[es-ds-docs]
C-->D
end
Y(nuxt3)
Z(primevue) --> C
Y-->D
es-ds-styles
- es-ds-styles started as a fork of Bootstrap 4.
- This package overrides the
_variables.scss
file in Bootstrap to the defaults required by the EnergySage design system. - There are additional variables and colors that diverge and extend from the core Bootstrap framework.
- The SASS has also been refactored to use the modular system and dart-sass compiler.
- Prior to v3.0,
es-ds-styles
worked with thees-vue-base
package, which is based on bootstrap-vue. As such, there are still some legacy Bootstrap Vue styles present ines-ds-styles
. Those are deprecated and will be removed in a future version.
es-ds-components
- es-ds-components contains Vue 3 components for use in Nuxt 3 projects. It is primarily based on PrimeVue, with some customizations specific to EnergySage.
es-ds-docs
- This is the design system documentation site powered by Nuxt 3.
- It also serves a reference for
how to integrate
es-ds
packages into a Nuxt 3 project.
clone git@github.com:EnergySage/es-ds.git
When publishing changes you will commit to the origin branch of the es-ds repo. So your git set-up should look like this:
$ git remote -v
origin git@github.com:EnergySage/es-ds.git (fetch)
origin git@github.com:EnergySage/es-ds.git (push)
make install && make symlink
- installs all packages from npm
make dev
This command will:
- Locally link your
es-ds-styles
andes-ds-components
folders to thees-ds-docs
Nuxt app - Start the
es-ds-docs
local dev server
You can then make changes as desired in either upstream package folder and the local dev server should immediately reflect those changes.
make unlink
This command will:
- Undo the local linking set up by the above command
- Reinstall the public NPM versions of the
es-ds-styles
andes-ds-components
packages
This enables you to run the es-ds-docs
server with the state of code that is publicly available on NPM.
cd es-ds-docs
npm run dev
These commands will:
- Run the
es-ds-docs
local dev server without locally linking to thees-ds-styles
andes-ds-components
packages folders - Whichever versions of the two upstream packages are installed (or already locally linked) will be used
In your PR, make sure to include a section in the changelog documenting your change. Following keep a changelog conventions this will look similar to the following:
## [Unreleased]
### Added
- Thing one
### Changed
- Thing two
This will make it easier to ensure all changes merged into main
are captured
in the changelog when publishing a new release.
Assuming changes are approved, the process of publishing a new version is...
0. Ensure your local environment is
setup and you are on
the main
branch
- Make sure the package.json versions in
es-ds-styles
andes-ds-components
is updated to a new version that hasn't been published before on NPM. npm login
- Logs you into the npm.js registry. You'll need access to oures-ds
package there in order for things to work.make install && make symlink
- Install and symlink dependencies locallymake build
- Build all packages to*/dist
folders locallymake lint && make typecheck && make test
- Run tests and linting to ensure they pass- Publish updated packages to
npmjs.com with npm publish.
cd es-ds-styles && npm publish && cd ..
cd es-ds-components
and update the version ofes-ds-styles
to the just-published one, and runnpm install
and then runnpm publish && cd ..
- Update CHANGELOG.md with our newly published changes
make update-package-deps
- Install the new published versions locallygit commit -m "docs: :memo: add version X.X.X to the changelog" && git push
- Commit and push the changelog andpackage-lock.json
updates
Deploys currently happen automatically to new.design.energysage.dev.