svelte-qrcode-image
Advanced tools
Comparing version 1.0.0-rc.2 to 2.0.0-alpha.1
103
package.json
{ | ||
"name": "svelte-qrcode-image", | ||
"version": "1.0.0-rc.2", | ||
"devDependencies": { | ||
"@sveltejs/adapter-auto": "next", | ||
"@sveltejs/kit": "next", | ||
"@sveltejs/package": "next", | ||
"@types/qrcode": "^1.5.0", | ||
"svelte": "^3.44.0", | ||
"svelte-check": "^2.7.1", | ||
"svelte-preprocess": "^4.10.6", | ||
"tslib": "^2.3.1", | ||
"typescript": "^4.7.4", | ||
"vite": "^3.0.0" | ||
}, | ||
"type": "module", | ||
"dependencies": { | ||
"qrcode": "^1.5.1" | ||
}, | ||
"homepage": "https://svelte-qrcode-image.itoldyou.dev/", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/1toldyou/svelte-qrcode-image.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/1toldyou/svelte-qrcode-image/issues" | ||
}, | ||
"keywords": [ | ||
"qrcode", | ||
"qr-code", | ||
"qr", | ||
"svelte", | ||
"sveltekit", | ||
"svelte-kit" | ||
], | ||
"license": "MIT", | ||
"exports": { | ||
"./package.json": "./package.json", | ||
".": "./index.js", | ||
"./QRCodeImage.svelte": "./QRCodeImage.svelte", | ||
"./util": "./util.js" | ||
}, | ||
"svelte": "./index.js" | ||
} | ||
"name": "svelte-qrcode-image", | ||
"version": "2.0.0-alpha.1", | ||
"scripts": { | ||
"dev": "vite dev", | ||
"build": "vite build && npm run package", | ||
"preview": "vite preview", | ||
"package": "svelte-kit sync && svelte-package && publint", | ||
"prepublishOnly": "npm run package", | ||
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", | ||
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch" | ||
}, | ||
"exports": { | ||
".": { | ||
"types": "./dist/index.d.ts", | ||
"svelte": "./dist/index.js" | ||
} | ||
}, | ||
"files": [ | ||
"dist", | ||
"!dist/**/*.test.*", | ||
"!dist/**/*.spec.*" | ||
], | ||
"peerDependencies": { | ||
"svelte": "^4.0.0" | ||
}, | ||
"devDependencies": { | ||
"@sveltejs/adapter-auto": "^3.0.0", | ||
"@sveltejs/kit": "^2.0.0", | ||
"@sveltejs/package": "^2.0.0", | ||
"@sveltejs/vite-plugin-svelte": "^3.0.0", | ||
"publint": "^0.1.9", | ||
"svelte": "^4.2.7", | ||
"svelte-check": "^3.6.0", | ||
"tslib": "^2.4.1", | ||
"typescript": "^5.0.0", | ||
"vite": "^5.0.11" | ||
}, | ||
"svelte": "./dist/index.js", | ||
"types": "./dist/index.d.ts", | ||
"type": "module", | ||
"dependencies": { | ||
"@nuintun/qrcode": "^4.1.4" | ||
}, | ||
"homepage": "https://svelte-qrcode-image.itoldyou.dev/", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/1toldyou/svelte-qrcode-image.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/1toldyou/svelte-qrcode-image/issues" | ||
}, | ||
"keywords": [ | ||
"qrcode", | ||
"qr-code", | ||
"qr", | ||
"svelte", | ||
"sveltekit", | ||
"svelte-kit" | ||
] | ||
} |
@@ -69,3 +69,3 @@ # Svelte-QRCode-Image | ||
Nevertheless, we recommend you to this with the latest version of Svelte or SvelteKit and unable to guarantee that it will work with older versions. | ||
The minimum version required of SvelteKit is `1.0.0-next.373` which use Vite 3. | ||
The minimum version required of SvelteKit is `1.0.0-next.373` which use Vite 3. | ||
And not works with [ancient browsers](https://vitejs.dev/guide/migration.html#modern-browser-baseline-change) by default. | ||
@@ -99,51 +99,59 @@ | ||
# create-svelte | ||
Everything you need to build a Svelte library, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/main/packages/create-svelte). | ||
Read more about creating a library [in the docs](https://kit.svelte.dev/docs/packaging). | ||
## Creating a project | ||
If you're seeing this, you've probably already done this step. Congrats! | ||
```bash | ||
# create a new project in the current directory | ||
npm create svelte@latest | ||
# create a new project in my-app | ||
npm create svelte@latest my-app | ||
``` | ||
## Developing | ||
Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server: | ||
```bash | ||
npm run dev | ||
``` | ||
You can change the port in `vite.config.ts`, | ||
the default port is 3001 | ||
and can be opened in `localhost:3001` or `127.0.0.1:3001` | ||
Since this being setup as SvelteKit project, so you should create your component in `src/lib` directory. | ||
And re-export it in `src/lib/index.js` file. | ||
```javascript | ||
export { default as MyComponent } from './MyComponent.svelte'; | ||
# or start the server and open the app in a new browser tab | ||
npm run dev -- --open | ||
``` | ||
## Publish Package | ||
Simply run this | ||
Everything inside `src/lib` is part of your library, everything inside `src/routes` can be used as a showcase or preview app. | ||
## Building | ||
To build your library: | ||
```bash | ||
svelte-package | ||
npm run package | ||
``` | ||
will create a new directory called `package` with the TypeScript definition | ||
<br> | ||
Then you can publish it to npm (remember to login first) | ||
To create a production version of your showcase app: | ||
```bash | ||
cd package | ||
npm publish | ||
npm run build | ||
``` | ||
or | ||
```bash | ||
npm publish ./package | ||
``` | ||
## Publish Website | ||
Due to recent change in SvelteKit, you need to run this command to build the website | ||
You can preview the production build with `npm run preview`. | ||
> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment. | ||
## Publishing | ||
Go into the `package.json` and give your package the desired name through the `"name"` option. Also consider adding a `"license"` field and point it to a `LICENSE` file which you can create from a template (one popular option is the [MIT license](https://opensource.org/license/mit/)). | ||
To publish your library to [npm](https://www.npmjs.com): | ||
```bash | ||
vite build | ||
npm publish | ||
``` | ||
Instead of 'npm run build` | ||
Since it's being internally linked to | ||
```bash | ||
svelte-kit sync && svelte-package | ||
``` | ||
Which will npt create the `public` directory, which is needed for the website to work. | ||
## Footnote | ||
- [node-qrcode](https://github.com/soldair/node-qrcode) and [qrcode](https://www.npmjs.com/package/qrcode) is the same thing |
No License Found
License(Experimental) License information could not be found.
Found 1 instance in 1 package
49
156
14284
2
6
1
+ Added@nuintun/qrcode@^4.1.4
+ Added@ampproject/remapping@2.3.0(transitive)
+ Added@jridgewell/gen-mapping@0.3.8(transitive)
+ Added@jridgewell/resolve-uri@3.1.2(transitive)
+ Added@jridgewell/set-array@1.2.1(transitive)
+ Added@jridgewell/sourcemap-codec@1.5.0(transitive)
+ Added@jridgewell/trace-mapping@0.3.25(transitive)
+ Added@nuintun/qrcode@4.1.13(transitive)
+ Added@types/estree@1.0.6(transitive)
+ Addedacorn@8.14.0(transitive)
+ Addedaria-query@5.3.2(transitive)
+ Addedaxobject-query@4.1.0(transitive)
+ Addedcode-red@1.0.4(transitive)
+ Addedcss-tree@2.3.1(transitive)
+ Addedestree-walker@3.0.3(transitive)
+ Addedis-reference@3.0.3(transitive)
+ Addedlocate-character@3.0.0(transitive)
+ Addedmagic-string@0.30.17(transitive)
+ Addedmdn-data@2.0.30(transitive)
+ Addedperiscopic@3.1.0(transitive)
+ Addedsource-map-js@1.2.1(transitive)
+ Addedsvelte@4.2.19(transitive)
+ Addedtslib@2.8.1(transitive)
- Removedqrcode@^1.5.1
- Removedansi-regex@5.0.1(transitive)
- Removedansi-styles@4.3.0(transitive)
- Removedcamelcase@5.3.1(transitive)
- Removedcliui@6.0.0(transitive)
- Removedcolor-convert@2.0.1(transitive)
- Removedcolor-name@1.1.4(transitive)
- Removeddecamelize@1.2.0(transitive)
- Removeddijkstrajs@1.0.3(transitive)
- Removedemoji-regex@8.0.0(transitive)
- Removedfind-up@4.1.0(transitive)
- Removedget-caller-file@2.0.5(transitive)
- Removedis-fullwidth-code-point@3.0.0(transitive)
- Removedlocate-path@5.0.0(transitive)
- Removedp-limit@2.3.0(transitive)
- Removedp-locate@4.1.0(transitive)
- Removedp-try@2.2.0(transitive)
- Removedpath-exists@4.0.0(transitive)
- Removedpngjs@5.0.0(transitive)
- Removedqrcode@1.5.4(transitive)
- Removedrequire-directory@2.1.1(transitive)
- Removedrequire-main-filename@2.0.0(transitive)
- Removedset-blocking@2.0.0(transitive)
- Removedstring-width@4.2.3(transitive)
- Removedstrip-ansi@6.0.1(transitive)
- Removedwhich-module@2.0.1(transitive)
- Removedwrap-ansi@6.2.0(transitive)
- Removedy18n@4.0.3(transitive)
- Removedyargs@15.4.1(transitive)
- Removedyargs-parser@18.1.3(transitive)