Skip to content

Commit

Permalink
feat(core): update to svelte 4, storybook 7, sass to 1.77.x
Browse files Browse the repository at this point in the history
BREAKING CHANGE: updated from svelte 3 to svelte 4. Consumers should use svelte 4
  • Loading branch information
hobbitronics committed Mar 4, 2024
1 parent b765b9d commit c58d599
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Reusable Svelte components for some internal applications

## installation

To install to your Svelte project, open your project's root directory in a terminal. Type or paste `npm i -D @silintl/ui-components` and press enter. Sass (depending on your bundler and plugins) 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 (I haven't figured out which versions require them). Enter the commands `npm i -D material-components-web@14` and `npm i -D sass@1` (versions will vary if you use an older release of this library). You should already have svelte@3 installed if you are using this library.
To install to your Svelte project, open your project's root directory in a terminal. Type or paste `npm i -D @silintl/ui-components` and press enter. Sass (depending on your bundler and plugins) 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 (I haven't figured out which versions require them). Enter the commands `npm i -D material-components-web@14` and `npm i -D sass@1` (versions will vary if you use an older release of this library). You should already have svelte@4 installed if you are using this library.

If you are using typescript you will need to run `npm i -D tslib` to avoid a material-components-web type error. This will already be installed if you have set up SvelteKit with typescript using `npm create svelte@latest app-name`.

Expand Down Expand Up @@ -69,7 +69,7 @@ and then import it to your sass entry point like \_index.scss. You may prefer to

SvelteKit won't need a bundler as it uses Vite, but Svelte projects will need a bundler (rollup or webpack most likely) configuration. If you are using rollup your plugins in your "rollup.config.js" should look something like this taking special note of postcss and svelte:

```
```js
import postcss from 'rollup-plugin-postcss';
import autoPreprocess from 'svelte-preprocess';

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"prettier-plugin-svelte": "^3.2.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"sass": "1.55.x",
"sass": "1.71.x",
"semantic-release": "^19.0.5",
"storybook": "^7.6.17"
}
Expand Down
2 changes: 1 addition & 1 deletion stories/Item.stories.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script>
import { Meta as MetaStory, Template, Story } from '@storybook/addon-svelte-csf'
import { Meta, Template, Story } from '@storybook/addon-svelte-csf'
import { List } from '../components/mdc'
import { copyAndModifyArgs } from './helpers.js'
Expand Down

0 comments on commit c58d599

Please sign in to comment.