Skip to content

Commit ba860e9

Browse files
committed
Sveltekit conversion
1 parent 06f715f commit ba860e9

22 files changed

+723
-1299
lines changed

.gitignore

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
.DS_Store
22
node_modules
3-
yarn.lock
4-
package-lock.json
5-
index.js
6-
index.mjs
7-
index.css
8-
index.css.map
3+
/build
4+
/dist
5+
/bundle
6+
/.svelte-kit
7+
/package
8+
.env
9+
.env.*
10+
!.env.example
11+
vite.config.js.timestamp-*
12+
vite.config.ts.timestamp-*

README.md

Lines changed: 9 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -18,27 +18,11 @@ The following are the main differences with the previous release:
1818

1919
# Usage
2020

21-
## From npm
22-
2321
```
2422
npm i @okrad/svelte-progressbar
2523
```
2624

27-
### Using in a standard js module
28-
29-
```javascript
30-
import ProgressBar from '@okrad/svelte-progressbar';
31-
32-
const pb = new ProgressBar({
33-
target: document.getElementById('demo'),
34-
props: {
35-
series: 20
36-
}
37-
});
38-
39-
```
40-
41-
### Using in a Svelte app
25+
Then you can use it like:
4226

4327
```javascript
4428
//main.js
@@ -70,20 +54,20 @@ export default app;
7054
## Building from source
7155

7256
```
73-
npm run build
57+
npm run package
7458
```
7559

76-
Creates unminified index.js and index.mjs files.
60+
Builds svelte files and transpiles ts into dist/ directory
7761

7862
Or...
7963

8064
```
81-
npm run dist
65+
npm run bundle
8266
```
8367

84-
Creates minified index.js and index.mjs files.
68+
Creates minified index.js and index.mjs files in the bundle/ directory.
8569

86-
Either way, include index.js in your html file, then instantiate the component:
70+
You can use the index.js bundle by including it in your html file, then instantiating the component:
8771
```javascript
8872
const pb = new ProgressBar({
8973
target: document.getElementById('demo'),
@@ -264,6 +248,9 @@ Take a look at these [working examples](https://okrad.github.io/svelte-progressb
264248

265249

266250
# Changelog
251+
2023/02/21: Version 2.1.0
252+
* Sveltekit conversion
253+
267254
2023/02/21: Version 2.0.0
268255
* Major refactorization, bringing full width support and many other improvements!
269256
* Moved to vite

0 commit comments

Comments
 (0)