0.2.1 • Published 2 years ago

@commonapp/common-app-design-system v0.2.1

Weekly downloads
-
License
-
Repository
github
Last release
2 years ago

Common App Design System (CADS)

Illustration of a forklift, sedan, and race car driving past telephone poles towards an "Under construction" sign.

Welcome

The Common App design system (CADS) is a collaborative effort to centrally store and manage shared components across the organization. These components are built and designed framework agnostic, meaning they are made to work in any Javascript-based application we may have now or in the future.

System

CADS utilizes ionic's Stencil as a framework to create and release these components. The output is usable within our current Angular applications as well as in the dot org site and our Salesforce communities.

Using Stencil

Developers should utilize Stencil's own documentation as a primary resource when building and maintaining components. As opportunities to expand this on our end appear, additional information may be available through the CADS Confluence pages.

Local testing

In the src/ folder is an index.html file. This HTML file should be used to test actively developed components. Placing the components being worked on in this file works with the www output target of Stencil to create a localhost environment to work on components.

Changes made to the index.html file should not be committed to the main branch. We may explore using a .gitignore line to untrack this file but for the time being, do not stage, commit, or push any changes to this file beyond the templating that already exists.

Once Storybook stories are created, it's also possible to do live development through Storybook itself. The core npm run start command is setup to enable developers to work on Stencil components and test them within Storybook.

Available scripts

Stencil (component creation and management)

ScriptAction
npm run buildBuild all components with documentation.
npm run build:prodBuild all components in full production mode.
npm run build:serveRun a hot-reloading Stencil build command.
npm run build:watchRun a hot-reloading Stencil build command and open a localhost server for testing.
npm run startConcurrently run build:serve and storybook for live component creation and testing within Storybook.
npm run test:allRun Jest (unit) and end-to-end (E2E) tests on all components.
npm run test:e2ePerform a single E2E test across all components.
npm run test:e2e:watchOpen a hot-reloading E2E testing instance.
npm run test:unitPerform a single Jest unit test run across all components.
npm run test:unit:watchOpen a hot-reloading Jest unit testing instance.
npm run generateCreate a new Stencil component.

Style Dictionary (token creation and management)

ScriptAction
npm run tokenizeGenerate new token outputs from changes in the source token folders.

Storybook (documentation and testing)

ScriptAction
npm run storybookStart a local Storybook server to test and work on documentation.
npm run storybook:buildRun the build task for Storybook output. Outputs a static version of Storybook to the ./public folder.

Linting and validation

ScriptAction
npm run eslintManually run ESLint on the entire project.
npm run prettierManually run Prettier on the entire project.
npm run stylelintManually run Stylelint against all stylesheets in the src/ folder.

Release

ScriptAction
npm run prepublishOnlyAutomatically run pre-publish by npm. Runs build:prod
npm run preversionAutomatically run pre version bump by npm. Runs test:all
0.2.1

2 years ago

0.2.0

2 years ago

0.2.0-alpha.2

2 years ago

0.2.0-alpha.1

2 years ago

0.1.0

2 years ago

0.1.0-alpha.5

2 years ago

0.1.0-alpha.4

2 years ago

0.1.0-alpha.3

2 years ago

0.1.0-alpha.2

2 years ago

0.1.0-alpha.1

2 years ago