Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/benoitzugmeyer/in-situ
Download, beautify and print lines from a minified JavaScript source
https://github.com/benoitzugmeyer/in-situ
Last synced: 3 months ago
JSON representation
Download, beautify and print lines from a minified JavaScript source
- Host: GitHub
- URL: https://github.com/benoitzugmeyer/in-situ
- Owner: BenoitZugmeyer
- License: isc
- Created: 2018-07-19T16:21:16.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2024-09-17T20:12:01.000Z (4 months ago)
- Last Synced: 2024-10-12T17:36:27.704Z (3 months ago)
- Language: TypeScript
- Size: 438 KB
- Stars: 25
- Watchers: 2
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# in-situ
`in-situ` is a simple CLI application taking a JavaScript file URL and a line/column location inside
it. It will download the JavaScript file, beautify it, and print the context around the given
location.## Installation
Install it globally with your favorite node package manager. Example:
```
npm install --global in-situ
```Note: instead of installing it, you can use `npx in-situ` to run it directly.
## Usage
```
Usage: in-situ [options]Download, beautify and print lines from a minified JavaScript source
The 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'.
Options:
-A, --after-context print lines of trailing context after the selected line
-B, --before-context print lines of leading context before the selected line
-C, --context print lines of leading and trailing context surrounding the selected line
--no-source-map don't try to use a source map
-d, --debug output extra debugging
-V, --version output the version number
-h, --help output usage information
```## Example
```
in-situ https://unpkg.com/[email protected]/dist/preact.min.js:1:3389
``````js
File: ../src/diff/props.js
}
}if (value) {
for (let i in value) {
if (!oldValue || value[i] !== oldValue[i]) {
^
setStyle(s, i, value[i]);
}
}
}
}
```