You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+22-3Lines changed: 22 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -82,18 +82,29 @@ yarn add svelte-file-dropzone
82
82
[Click here](https://github.com/thecodejack/svelte-file-dropzone/tree/master/stories/views) to view stories implementation
83
83
84
84
## Build
85
+
86
+
### Setup
87
+
85
88
To build from the source code, you'll need to use `pnpm` (if not installed already, install by `npm install -g pnpm`). To setup the environment, run:
86
89
87
90
```bash
88
91
pnpm install
89
92
pnpm sync
90
93
```
91
94
92
-
Then, you may launch the storybook development server by `pnpm storybook`.
95
+
### Build
96
+
97
+
To build the library, simply run `pnpm package`. The compiled output will be in the directory `package`.
98
+
99
+
### Storybook
100
+
101
+
You may view and build storybook examples of this library.
93
102
94
-
To generate the static HTML of the storybook, run `pnpm build-storybook`. You may launch a static HTML server and browse the output by `pnpm sirv-storybook`.
103
+
To see then you can run a storybook development server by `pnpm storybook`. Runing a development server is much quicker and more responsive to changes comparing to a full build.
95
104
96
-
On some node environments, you might see the following error:
105
+
To generate the static HTML of the storybook (i.e. full build, e.g. for hosting in static server), run `pnpm build-storybook`. You may launch a local static HTML server by `pnpm sirv-storybook`.
106
+
107
+
Note: On some node environments, you might see the following error:
To overcome this, set manually in console the environment variable `NODE_OPTIONS=--openssl-legacy-provider`. See https://stackoverflow.com/a/69746937/2968864 for details.
107
118
119
+
### SvelteKit Example
120
+
121
+
We also have a modified version of the official SvelteKit basic example, for showing how to use it on SvelteKit.
122
+
123
+
To explore it, start a Vite development server by `pnpm dev`.
124
+
125
+
If you wish to have a full build of the SvelteKit example project, run `pnpm build`. To see the results, run `pnpm preview`.
126
+
108
127
## Credits
109
128
110
129
Component is reimplementation [react-dropzone](https://github.com/react-dropzone/react-dropzone). Complete credit goes to author and contributors of [react-dropzone](https://github.com/react-dropzone/react-dropzone).
0 commit comments