New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

svelte-qrcode-image

Package Overview
Dependencies
Maintainers
0
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

svelte-qrcode-image - npm Package Compare versions

Comparing version 1.0.0-rc.2 to 2.0.0-alpha.1

dist/index.d.ts

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
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc