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 7
7
"dev" : " vite dev" ,
8
8
"build" : " vite build && npm run package" ,
9
9
"preview" : " vite preview" ,
10
- "package" : " svelte-kit sync && svelte-package && publint" ,
10
+ "package" : " svelte-kit sync && svelte-package && node scripts/copy-package.js && publint" ,
11
11
"prepublishOnly" : " npm run package" ,
12
12
"check" : " svelte-kit sync && svelte-check --tsconfig ./tsconfig.json" ,
13
13
"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 1
1
import sveltePkg from 'svelte/package.json' ;
2
- import pkg from '../../../ package.json'
2
+ import pkg from '../../package.json'
3
3
export const SVELTE_CLOUDINARY_ANALYTICS_ID = 'E' ;
4
4
export const SVELTE_CLOUDINARY_VERSION = pkg . version ;
5
5
export const SVELTE_VERSION = sveltePkg . version ;
You can’t perform that action at this time.
0 commit comments