Skip to content

Commit c09d5dd

Browse files
authored
Merge pull request #169 from silinternational/develop
Release 7.0.0
2 parents 96380dd + dda0bd0 commit c09d5dd

File tree

4 files changed

+2369
-2560
lines changed

4 files changed

+2369
-2560
lines changed

README.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Reusable Svelte components for some internal applications
44

55
## installation
66

7-
To install to your Svelte project, open your project's root directory in a terminal. Type or paste `npm i -D sass@1.50.x material-components-web@13.0.0 @silintl/ui-components` and press enter (versions will vary if you use an older release of this repo). Sass and-material-components web are required to develop additional material web components in your app, but it may depend on your version of npm if they are necessary even if you don't. You should already have svelte@3 installed if you are using this library.
7+
To install to your Svelte project, open your project's root directory in a terminal. Type or paste `npm i -D sass@1.55.x material-components-web@14.0.0 @silintl/ui-components` and press enter (versions will vary if you use an older release of this repo). Sass and-material-components web are required to develop additional material web components in your app, but it may depend on your version of npm if they are necessary even if you don't. You should already have svelte@3 installed if you are using this library.
88

99
If you are using typescript you will need to run `npm i -D tslib` to avoid a material-components-web type error.
1010

@@ -106,6 +106,19 @@ module.exports = {
106106
// ...
107107
```
108108

109+
## Sveltekit
110+
111+
Using this library in [Sveltekit](https://github.com/sveltejs/kit) is experimental (as of writing this Sveltekit is in release candidate phase).
112+
You may get lots of source map source warnings as referenced [here](https://github.com/vitejs/vite/issues/2892) and it may take several seconds and/or refreshes for your app to start with `npm run dev`. Building and previewing your build should run smoothly. Below are a number of references that may be relevant to your experience:
113+
114+
https://kit.svelte.dev/faq#packages
115+
https://vitejs.dev/guide/dep-pre-bundling.html
116+
https://vitejs.dev/guide/features.html#npm-dependency-resolving-and-pre-bundling
117+
https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/faq.md#what-is-going-on-with-vite-and-pre-bundling-dependencies
118+
https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/config.md#prebundlesveltelibraries
119+
https://github.com/vitejs/vite/issues/2892
120+
https://github.com/sveltejs/kit/issues/885
121+
109122
## components
110123

111124
A list of all components and their props can be found in our running instance of [Storybook](https://silinternational.github.io/ui-components/).
@@ -114,7 +127,7 @@ A list of all components and their props can be found in our running instance of
114127

115128
After installation and bundler configuration all of the components are ready to be imported.
116129

117-
Just include `import { Button } from '@silintl/ui-components'` in your script section to import Button and any other components you want to use.
130+
Just include `import { Button } from '@silintl/ui-components'` (Sveltekit/Vite will need to use the full url) in your script section to import Button and any other components you want to use.
118131

119132
## overriding default sass variables
120133

components/custom/Form/Form.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ const listenForBlurOnForm = (form) => {
6262

6363
<style>
6464
:global(form > *) {
65-
margin-top: 2rem;
65+
margin-top: 1rem;
6666
}
6767
</style>
6868

0 commit comments

Comments
 (0)