Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/benmerckx/find-jsx-strings
Find hardcoded strings in jsx/tsx files
https://github.com/benmerckx/find-jsx-strings
i18n jsx translation typescript
Last synced: 20 days ago
JSON representation
Find hardcoded strings in jsx/tsx files
- Host: GitHub
- URL: https://github.com/benmerckx/find-jsx-strings
- Owner: benmerckx
- Created: 2022-11-15T14:17:18.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2022-11-16T15:15:24.000Z (about 2 years ago)
- Last Synced: 2024-10-19T16:52:21.010Z (2 months ago)
- Topics: i18n, jsx, translation, typescript
- Language: JavaScript
- Homepage:
- Size: 838 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# find-jsx-strings
Utility to find hardcoded strings in jsx/tsx files (so they can be replaced by translations).
## Usage
```sh
npx find-jsx-strings [opts]
```## Example
```tsx
// index.tsx
export default function App() {
return (
Hello
Start editing
)
}
``````sh
npx find-jsx-strings .
```Will report:
```
index.tsx:6
6 │Hello
· ─────index.tsx:7
7 │Start editing
· ─────────────index.tsx:8
8 │
· ───────────────
```## Options
```
-A, --skip-attributes Skip all string attributes or accepts comma separated list
--skip-text Skip all JSX text
-P, --skip-pattern Skip text or attributes that include this string
--skip-files Skip all files that include these strings (comma separated list)
--include-literal Include reporting string literals
--include-template Include reporting template literals
-v, --version Displays current version
-h, --help Display help message
```