Skip to content

Commit a3cebc8

Browse files
Merge pull request #27 from bhavikdev/remove-global-dependency
feat:use npx to run source-map-explorer
2 parents 608aba7 + 5505cce commit a3cebc8

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

README.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,8 @@ This builder does it for you with zero configuration.
1717
ng add @ngx-builders/analyze
1818
```
1919

20-
NOTE: For this version you need to install source-map-explorer globally using
20+
NOTE: This version uses npx to install source-map-explorer temporarily if it isn't installed already. If you don't have npx installed, please install it.
2121

22-
```
23-
npm i source-map-explorer -g
24-
```
2522

2623
We will remove this dependecny in future updates.
2724

analyze/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export default createBuilder<any>(
5454
mainFile = promptAvailableBundles.bundleName;
5555
}
5656

57-
const explorerCommand = `source-map-explorer ${builderConfig.outputPath}/${mainFile}`;
57+
const explorerCommand = `npx source-map-explorer ${builderConfig.outputPath}/${mainFile}`;
5858
const { stdout, stderr } = await execAsync(explorerCommand);
5959
context.logger.info(stdout);
6060
context.logger.info(stderr);

0 commit comments

Comments
 (0)