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`.
4
4
5
5
*
6
6
Original file line number Diff line number Diff line change @@ -31,18 +31,18 @@ ASSETS.forEach(asset => {
31
31
32
32
// package.json modifications
33
33
const 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 ) ;
35
35
36
36
// 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 } /` , '' ) ;
39
39
} ) ;
40
40
41
41
// TODO decide if we want this:
42
- delete pkg . scripts ;
43
- delete pkg . volta ;
42
+ delete pkgJson . scripts ;
43
+ delete pkgJson . volta ;
44
44
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 ) ) ;
47
47
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