pulibrary / lux-design-system

Princeton University Library's design system
https://pulibrary.github.io/lux-design-system/
1 stars 1 forks source link

Lux Design System

View the Design System

Adding Lux to an application or website

Project setup

npm install

Serve the styleguide documentation locally

npm run styleguide

Running tests

Release a new version

This requires you to have an account on npm with 2fa enabled. You will also need to be part of the PULibrary organization on npm.

npm login
npm install --global np@9.2.0 # don't add this as a devDependency, otherwise you won't be able to push to npm
npm run release

Tips

Deploy the styleguide to GitHub Pages

npm run deploy

This will update the docs at https://pulibrary.github.io/lux-design-system/. Please note: For informational purposes only. Don't do this outside of a release!

Linting

We are using the eslint_plugin-prettier to lint our files. To adjust the lint format settings, please use the .prettierrc file. Code linting rules should be set in eslintrc.js.

Style Linting

We are using stylelint and stylelint-config-standard-scss to lint scss files. To disable or customize any rules use the .stylelintrc.json. Run npx stylelint "**/*.scss" to lint the scss files.

Customize configuration

See Configuration Reference.

Using a local copy of lux-design-system in your project

  1. yarn global add yalc (yalc has to be installed globally, it doesn't work as part of the package.json)
  2. In lux-design-system run: npm run build && yarn exec yalc publish
    You should see a note that it's published in store
  3. In the application where lux-design-system is installed,
    run: yarn exec yalc add lux-design-system
  4. Sometimes, your application's vite will have cached the old version. If you are not seeing your changes, in your application directory run:
    • bundle exec vite clobber for ruby projects
    • yarn dev --force for Vue projects

Upgrade Instructions

  1. Upgrade from lux 4 to lux 5