Skip to content

Latest commit

 

History

History
34 lines (23 loc) · 2.41 KB

CONSUMPTION.md

File metadata and controls

34 lines (23 loc) · 2.41 KB

General Consumption Guide

Consumption can vary by package - the information below is for general consumption.

with NPM

Consume each individual package by adding the NPM dependency to package.json with the version number required:

without NPM

Assets can be collected directly from unpkg, which is a layer on top of npmjs that serves the files in a raw format. To consume these files, a GET request can be made to the files path:

# dark-stable theme as json
https://unpkg.com/@momentum-design/tokens/dist/json/theme/webex/dark-stable.json

# light-stable theme as json
https://unpkg.com/@momentum-design/tokens/dist/json/theme/webex/light-stable.json 

If a team would like to consume the full package [all assets delivered within the scope of @momentum-design/tokens i.e.], the tar.gz can be acquired by using curl and tar commands (both available on Mac and latest Windows).

The snippet example below will download the version of the defined package as a .tgz and extract its content (tokens as an example, replace accordingly to your needs).

curl https://registry.npmjs.org/@momentum-design/tokens/-/tokens-0.0.46.tgz --output tokens.tgz
tar -xf tokens.tgz