You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-3
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
1
# in-situ
2
2
3
-
`in-situ` is a simple CLI application taking a JavaScript file URL and a line/column position inside
3
+
`in-situ` is a simple CLI application taking a JavaScript file URL and a line/column location inside
4
4
it. It will download the JavaScript file, beautify it, and print the context around the given
5
-
position.
5
+
location.
6
6
7
7
## Installation
8
8
@@ -17,10 +17,12 @@ Note: instead of installing it, you can use `npx in-situ` to run it directly.
17
17
## Usage
18
18
19
19
```
20
-
Usage: in-situ [options] <URL:LINE:COLUMN>
20
+
Usage: in-situ [options] <LOCATION>
21
21
22
22
Download, beautify and print lines from a minified JavaScript source
23
23
24
+
The <LOCATION> argument is an URL or a file path to a JavaScript bundle, followed by a location formatted as ':line:column' or ':osition'. Example: 'https://example.com/bundle.js:10:20' or './bundle.js:123'.
25
+
24
26
Options:
25
27
-A, --after-context <num> print <num> lines of trailing context after the selected line
26
28
-B, --before-context <num> print <num> lines of leading context before the selected line
The <LOCATION> argument is an URL or a file path to a JavaScript bundle, followed by a location formatted as ':line:column' or ':osition'. Example: 'https://example.com/bundle.js:10:20' or './bundle.js:123'.
52
+
50
53
Options:`;
51
54
for(const[name,option]ofObject.entries(OPTIONS)){
52
55
letnames="";
@@ -69,7 +72,7 @@ function commanVersion() {
69
72
asyncfunctioncommandContext({
70
73
debug,
71
74
sourceURL,
72
-
position,
75
+
location,
73
76
beforeContext,
74
77
afterContext,
75
78
useSourceMap,
@@ -84,15 +87,17 @@ async function commandContext({
84
87
thrownewCLIError(`Failed to fetch source code: ${e}`);
0 commit comments