docs: update README, links (#1509)

* docs: add note on using `optimizeImports` with `svelte-preprocess` (Closes #1500)

* docs: point link to SASS guide to v10 (#1489)

* docs: remove note on minimum Svelte version as it's been almost half a year since 3.48 was released
This commit is contained in:
metonym 2022-10-03 20:32:48 -07:00 committed by GitHub
commit 59c02c9a92
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 12 deletions

View file

@ -31,8 +31,6 @@ Other forms of documentation are auto-generated:
Install `carbon-components-svelte` as a development dependency.
A minimum Svelte version of 3.48.0 is required to use this library.
```sh
# Yarn
yarn add -D carbon-components-svelte
@ -200,7 +198,7 @@ The preprocessor optimizes imports from the following packages:
- [carbon-icons-svelte](https://github.com/carbon-design-system/carbon-icons-svelte)
- [carbon-pictograms-svelte](https://github.com/carbon-design-system/carbon-pictograms-svelte)
**Example**
**Before & After**
```diff
- import { Button } from "carbon-components-svelte";
@ -222,6 +220,21 @@ export default {
};
```
`svelte-preprocess` should be invoked before any preprocessor from `carbon-preprocess-svelte`.
```diff
// svelte.config.js
+ import sveltePreprocess from "svelte-preprocess";
import { optimizeImports } from "carbon-preprocess-svelte";
export default {
preprocess: [
+ sveltePreprocess(),
optimizeImports()
],
};
```
## Examples
- [examples/rollup](examples/rollup/)