File tree Expand file tree Collapse file tree 3 files changed +15
-2
lines changed
Expand file tree Collapse file tree 3 files changed +15
-2
lines changed Original file line number Diff line number Diff line change 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" ,
Original file line number Diff line number Diff line change 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' )
Original file line number Diff line number Diff line change 11import sveltePkg from 'svelte/package.json' ;
2- import pkg from '../../../ package.json'
2+ import pkg from '../../package.json'
33export const SVELTE_CLOUDINARY_ANALYTICS_ID = 'E' ;
44export const SVELTE_CLOUDINARY_VERSION = pkg . version ;
55export const SVELTE_VERSION = sveltePkg . version ;
You can’t perform that action at this time.
0 commit comments