lux-design-system

4.5.7 • Public • Published

CircleCI npm version Dependencies status MIT License

LUX Design System

View the docs

To add to your project:

# this will add the latest official release
yarn add lux-design-system

If you are looking to integrate LUX into an existing Rails, Drupal, or even JSFiddle, check out our documentation for How to Install LUX.

To ride the bleeding edge, pull directly from the GitHub in package.json dependencies:

...
"dependencies": {
  "lux-design-system": "pulibrary/lux"
}
...

To use an older version, add pin the npm version you want to your package.json dependencies:

...
"dependencies": {
  "lux-design-system": "^0.0.0"
}
...

To generate static asset files to use in a stand-alone HTML doc, run this command:

yarn build:static

Then use <script/> and <link/> tags to include to the js and css files in the static/system directory in your HTML. Then include any LUX components in a wrapper with class="lux".

To contribute to lux:

  • You will need Node v10.16.0+
  • If you use a NVM, run nvm install or nvm use if you already know you have Node v10.16.0
yarn install

To start development server:

yarn start

To run all unit tests:

yarn test

To run a single test:

yarn unit mytest.spec.js

To develop LUX locally as a dependency in a project

You might want to develop LUX while developing on a project that uses LUX as a dependency. For example, you might want to develop LUX components while developing the Approvals app. NOTE: You will need to have both LUX and the project using it as a dependency running on your machine.

  1. Install yalc
  2. In the LUX root directory, run yarn build:system && yalc publish
  3. In the Project (e.g., Approvals) root directory, run yalc add lux-design-system
  4. Each time that you are ready to view the LUX work in progress, run the last 2 steps:
    1. In the LUX root directory, run yarn build:system && yalc publish
    2. In the Project (e.g., Approvals) root directory, run yalc update

To deploy docs:

# make sure git status is clean with no uncommitted modified files
yarn run deploy

To publish a new version to npm:

  1. If you don't already have np installed, yarn global add np. If you are running an old version of node (e.g. Node 12), you may need to install an older version of np (e.g. yarn global add np@6.5.0)
  2. If you have a passphrase on your ssh key, run ssh-add ~/.ssh/id_ed25519 (or wherever your key is located).
  3. If you use a security key, rather than an authenticator app, for two-factor authentication in npmjs.com, make sure that "Require two-factor authentication for write actions" is not checked in your account 2FA settings. If it is checked, np will ask you for an OTP from your phone, and won't allow you to push without it.
  4. Pull latest main with merged changes.
  5. Run yarn login
  6. Run yarn release
  7. 🎉

Package Sidebar

Install

npm i lux-design-system

Weekly Downloads

381

Version

4.5.7

License

MIT

Unpacked Size

721 kB

Total Files

19

Last publish

Collaborators

  • maxkadel
  • christinachor
  • sandbergja
  • sdellis