Skip to content

Commit 773fbc3

Browse files
committed
Update README.md build instructions
1 parent 8ce621f commit 773fbc3

File tree

1 file changed

+22
-3
lines changed

1 file changed

+22
-3
lines changed

README.md

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,18 +82,29 @@ yarn add svelte-file-dropzone
8282
[Click here](https://github.com/thecodejack/svelte-file-dropzone/tree/master/stories/views) to view stories implementation
8383

8484
## Build
85+
86+
### Setup
87+
8588
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:
8689

8790
```bash
8891
pnpm install
8992
pnpm sync
9093
```
9194

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.
93102

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.
95104

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:
97108

98109
```
99110
node:internal/crypto/hash:67
@@ -105,6 +116,14 @@ Error: error:0308010C:digital envelope routines::unsupported
105116

106117
To overcome this, set manually in console the environment variable `NODE_OPTIONS=--openssl-legacy-provider`. See https://stackoverflow.com/a/69746937/2968864 for details.
107118

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+
108127
## Credits
109128

110129
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

Comments
 (0)