File tree Expand file tree Collapse file tree 2 files changed +11
-11
lines changed Expand file tree Collapse file tree 2 files changed +11
-11
lines changed Original file line number Diff line number Diff line change 1- # Info: the paths in this file are adjusted to match once this
2- # file is copied to `./build`. This is done by a postbuild script
3- # located in sentry-javascript/scripts/postbuild.ts
1+ # Info: the paths in this file are specified so that they align with the file
2+ # structure in `./build` where this file is copied to. This is done by the
3+ # postbuild script ` sentry-javascript/scripts/postbuild.ts`.
44
55*
66
Original file line number Diff line number Diff line change @@ -31,18 +31,18 @@ ASSETS.forEach(asset => {
3131
3232// package.json modifications
3333const packageJsonPath = path . join ( process . cwd ( ) , BUILD_DIR , 'package.json' ) ;
34- const pkg : { [ key : string ] : string } = require ( packageJsonPath ) ;
34+ const pkgJson : { [ key : string ] : string } = require ( packageJsonPath ) ;
3535
3636// modify entry points to point to correct paths (i.e. strip out the build directory)
37- ENTRY_POINTS . filter ( entryPoint => ! ! pkg [ entryPoint ] ) . forEach ( entryPoint => {
38- pkg [ entryPoint ] = pkg [ entryPoint ] . replace ( `${ BUILD_DIR } /` , '' ) ;
37+ ENTRY_POINTS . filter ( entryPoint => pkgJson [ entryPoint ] ) . forEach ( entryPoint => {
38+ pkgJson [ entryPoint ] = pkgJson [ entryPoint ] . replace ( `${ BUILD_DIR } /` , '' ) ;
3939} ) ;
4040
4141// TODO decide if we want this:
42- delete pkg . scripts ;
43- delete pkg . volta ;
42+ delete pkgJson . scripts ;
43+ delete pkgJson . volta ;
4444
45- // write modified package.json to file
46- fs . writeFileSync ( packageJsonPath , JSON . stringify ( pkg , null , 2 ) ) ;
45+ // write modified package.json to file (pretty-printed with 2 spaces)
46+ fs . writeFileSync ( packageJsonPath , JSON . stringify ( pkgJson , null , 2 ) ) ;
4747
48- console . log ( `\nSuccessfully finished postbuild commands for ${ pkg . name } ` ) ;
48+ console . log ( `\nSuccessfully finished postbuild commands for ${ pkgJson . name } ` ) ;
You can’t perform that action at this time.
0 commit comments