lux-design-system 5.2.1 → 5.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -45,59 +45,18 @@ npm run deploy
45
45
  This will update the docs at [https://pulibrary.github.io/lux-design-system/](https://pulibrary.github.io/lux-design-system/).
46
46
  Please note: For informational purposes only. Don't do this outside of a release!
47
47
 
48
-
49
- ## Copying Vue 2 components from lux
50
- 1. Copy a component from the lux repository into src/components
51
- 1. Run `npm run lint --fix` to make sure the component has our formatting rules applied.
52
- 1. This repo uses CSS variables, rather than SCSS token variables. If the component
53
- includes tokens:
54
- 1. Add `@import "../assets/styles/variables.css";` to the `<style>` section.
55
- 1. Replace any token references to use the CSS variable instead. For example,
56
- `$font-family-text` can be changed to `var(--font-family-text)`.
57
- 1. If the component includes SCSS mixins, add `@import "../assets/styles/mixins.scss";`
58
- to the `<style>` section. You may also need `../assets/styles/spacing.scss` if the
59
- component uses spacing mixins. Media queries can't be included in CSS variables, so if you need those, import `../assets/styles/media_queries.scss` and use SCSS variables. There are functions that use SCSS variables and cannot take CSS variables as a parameter; In this case add `@import ../assets/styles/system.scss`.
60
- 1. Vue 3 no longer supports functional templates. If the component includes `<template functional>`,
61
- you will need to refactor it back into a regular template.
62
- 1. If the component emits events, [declare the emits in the `emits` option](https://v3-migration.vuejs.org/breaking-changes/emits-option.html).
63
- 1. Run `npm run styleguide` and make sure it compiles and looks good.
64
- 1. Add the component to src/components/index.js so it is added to the lux Vue plugin and can be used in other projects.
65
- 1. Copy the test for the component from the lux test/unit/specs/components directory.
66
- 1. Revert any changes to the test that were needed for functional templates.
67
- 1. Modify the import for the test to point to the component's new path.
68
- 1. Remove any references to `localVue`, the new versions of vue-test-utils don't
69
- support it or need it.
70
- 1. Change mount params in this format:
71
-
72
- ```
73
- {context: { props: { my_data: "data" }}}
74
- ```
75
-
76
- to this format:
77
-
78
- ```
79
- {props: { my_data: "data" }}
80
- ```
81
- 1. Run the tests with `npm run test`. Make any necessary changes to get the tests to pass.
82
- 1. If a value is not updating correctly after a `wrapper.setProps` call, follow these steps to add a `nextTick()`, which will cause Vue to update the value:
83
- 1. If it's not already imported, add `import { nextTick } from "vue"`
84
- 2. Add `async` to the test arrow function.
85
- 3. Add `await nextTick()` between the `setProps` and the assertion, or simply prepend the setProps command with `await`. (Example: `await wrapper.setProps({ show: true })`)
86
- 1. Refer to the [vue-test-utils migration guide](https://test-utils.vuejs.org/migration/) for other breaking changes.
87
- 1. Running the tests will produce a snapshot file. Compare it to the original snapshot file. If there are no substantial changes, commit it. If there are substantial changes, make any necessary changes.
88
-
89
48
  ### Linting
90
49
  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`.
91
50
 
92
51
  ### Customize configuration
93
52
  See [Configuration Reference](https://cli.vuejs.org/config/).
94
53
 
95
- ### Using a local copy of lux-styleguidist in your project
54
+ ### Using a local copy of lux-design-system in your project
96
55
 
97
56
  1. `yarn global add yalc` (yalc has to be installed globally, it doesn't work as part of the package.json)
98
- 2. In lux-styleguidist run: `npm run build && yarn exec yalc publish`
57
+ 2. In lux-design-system run: `npm run build && yarn exec yalc publish`
99
58
  You should see a note that it's published in store
100
- 3. In the application where lux-styleguidist is installed,
59
+ 3. In the application where lux-design-system is installed,
101
60
  run: `yarn exec yalc add lux-design-system`
102
61
  4. Sometimes, your application's vite will have cached the old version.
103
62
  If you are not seeing your changes, in your application directory run: