Design systems enable teams to build better products faster by making design reusableβreusability makes scale possible. This is the heart and primary value of design systems. A design system is a collection of reusable components, guided by clear standards, that can be assembled together to build any number of applications.
Atlantis is a design system for Jobber. The primary objective for Atlantis is to provide a system of reusable components to help developers to quickly build beautiful and consistent interfaces for our users.
node@24pnpm@10
To install Atlantis locally for development:
git clone git@github.com:GetJobber/atlantis.git
cd atlantis
pnpm installTo start local development for Atlantis:
pnpm startThis starts the web Storybook, the mobile Storybook, and the docs site together.
When installing dependencies, unless they are required for the documentation viewer, they should be within the package you are working within.
Within Atlantis, in order for one package to depend on another all that is
required is for it to be listed in the appropriate package.json file. Lerna
will automatically take care of managing the versions for you.
When working on some packages (for example design) locally, you'll need to run
pnpm run bootstrapand then
pnpm startto view and test your changes.
Atlantis packages are installed and updated using npm. This following list has installation links for each package:
These are the core packages you'll need to build with Atlantis:
Once a package is installed, update that package to the latest version by running:
npm install @jobber/{package}@latestor if you want a specific version:
npm install @jobber/{package}@{version}If you're looking to build documentation and tooling using Atlantis' development standards, these packages will be useful:
Running the following command will prompt you for a component name and generate a starting point consisting of a component, tests, styling, etc to help you get started.
You should name your component in PascalCase.
pnpm run generateYou will be able to select the platform you want to create the component.
β―β―β― pnpm run generate
> atlantis@0.0.1 generate /path/to/atlantis
> plop
? Component Name: ExampleComponent
? Generate for:
> Web
> React Native
> Both
β +! 5 files added
-> /packages/components/src/ExampleComponent/index.ts
-> /packages/components/src/ExampleComponent/ExampleComponent.css
-> /packages/components/src/ExampleComponent/ExampleComponent.stories.mdx
-> /packages/components/src/ExampleComponent/ExampleComponent.test.tsx
-> /packages/components/src/ExampleComponent/ExampleComponent.tsx
β +! 2 files added
-> /docs/components/ExampleComponent/Web.stories.tsx
-> /docs/components/ExampleComponent/ExampleComponent.stories.mdxTo run tests:
pnpm testTo ensure your code passes our linters run:
pnpm run lintYou can also auto fix many linting errors by running:
pnpm run lint:fixYou can run the linters separately with:
pnpm run lint:css
pnpm run lint:jsIf you want to troubleshoot linting errors in CI, try running locally first to
find the error. If that doesn't work you can open the artifacts for the linting
step. To find the errors causing the failure, search for Error - .
The atlantis repo is a monorepo consisting of a few different packages all
living in the ./packages/ directory.
The primary packages in here are:
packages/components/- The primary home for components. Each component lives in its own folder in
the
./srcdirectory within here.
- The primary home for components. Each component lives in its own folder in
the
design/- A home for shareable css variables.
When installing dependencies be sure to install them relative to the appropriate
sub package. For example if you want to use package foo in the components
package, you would run pnpm --filter @jobber/components add foo.
For more information on how the packages are bootstrapped, check out pnpm workspaces.
Everyone is a friend of Atlantis and we welcome pull requests. See the contribution guidelines to learn how.
Atlantis uses Lerna and will automatically publish whenever a pull request is merged.
Follow semver when choosing versions.
pnpm run release-the-krakenIn some cases, the automatic release may successfully bump the version and add a changelog but fail to publish to NPM. If this happens and you're one of the Atlantis NPM collaborators, run the code below to send unpublished versions to NPM.
pnpm run release:unpublished-packagepnpm run publish:prereleaseLerna automatically determines which package changed and can be released. However, if you've only changed/added/updated an NPM package, Lerna won't count that as a releasable "change". The script below should allow you to create a prerelease for package changes.
pnpm run publish:prerelease:force @jobber/componentsNOTE: You can replace @jobber/components with the package you want to
prerelease or remove it to prerelease all of them.
It is possible to generate Pre-releases through GitHub Actions.
- To do this create a Pull Request for your branch.
- Navigate to the Actions tab.
- Navigate to the
Trigger Pre-release BuildAction - Run click
Run Workflow, select your branch and use thePublish Pre-release (Recommended)option - If you only have dependency changes run the
Force Publish <package>to get those changes published. This is only needed if the only file modified is thepackage.jsonorpnpm-lock.yaml - When the Action is finished your PR will have a comment with the new release versions
NOTE: You can only do 1 pre-release per commit. If you trigger another pre-release on a previously published commit, it will fail. This also happens on forced pre-release.
If you're not sharing your changes with your peers yet and want a quicker way to
check your changes, you can run pnpm run pack -- {{scope}} from the root
folder against one of the workspaces.
pnpm run pack -- @jobber/componentsThat will create a jobber-components-{{version}}.tgz file on the root. You can
then install it on your project.
npm i your/path/to/atlantis/repo/jobber-components-{{version}}.tgzYou can replace @jobber/components with @jobber/design, @jobber/hooks or
the package you want to be packed up.
NOTE: Use a pre-release if you want to share your changes with someone else instead of sending them the file.
lerna changed