Skip to content

Commit 6a42d6d

Browse files
committed
fix: patch update, fix package.json import
1 parent 2ef7826 commit 6a42d6d

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

svelte-cloudinary/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"dev": "vite dev",
88
"build": "vite build && npm run package",
99
"preview": "vite preview",
10-
"package": "svelte-kit sync && svelte-package && publint",
10+
"package": "svelte-kit sync && svelte-package && node scripts/copy-package.js && publint",
1111
"prepublishOnly": "npm run package",
1212
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
1313
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import fs from 'fs';
2+
3+
// read file into JSON
4+
const pkg = JSON.parse(fs.readFileSync('package.json', 'utf-8'));
5+
6+
// adjust pkg json however you like ..
7+
8+
// write it to your output directory
9+
fs.writeFileSync(
10+
'./dist/package.json', // path to your output directory may vary
11+
JSON.stringify(pkg, null, 2)
12+
);
13+
console.log('package.json written to /dist')
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import sveltePkg from 'svelte/package.json';
2-
import pkg from '../../../package.json'
2+
import pkg from '../../package.json'
33
export const SVELTE_CLOUDINARY_ANALYTICS_ID = 'E';
44
export const SVELTE_CLOUDINARY_VERSION = pkg.version;
55
export const SVELTE_VERSION = sveltePkg.version;

0 commit comments

Comments
 (0)