Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: improve readme and ci #42

Merged
merged 1 commit into from
Jul 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
push:
branches:
- "main"
pull_request:
branches:
- "*"

jobs:
build_and_testing:
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2017 Tomáš Ehrlich
Copyright (c) 2017-2022 Tomáš Ehrlich, (c) 2022-present Crowdin.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<img src="https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg" />
</a>


This repository contains a collection of codemod scripts for use with [JSCodeshift](https://github.com/facebook/jscodeshift) that help update Lingui APIs.

<hr />
Expand All @@ -20,11 +19,9 @@ This repository contains a collection of codemod scripts for use with [JSCodeshi
- `transform` - name of transform, see available transforms below.
- `path` - files or directory to transform
- use the `--dry` option for a dry-run
- use `--print` to print the output for
comparison
- use `--print` to print the output for comparison
- use `--remove-unused-imports` to remove unused imports once finished the codemod


This will start an interactive wizard, and then run the specified transform.

### Included Transforms
Expand All @@ -37,6 +34,16 @@ Converts some outdated standards from `lingui` version 2.x.x to new features and
npx @lingui/codemods v2-to-v3 <path>
```

#### `split-macro-imports`

Converts `@lingui/macro` imports to `@lingui/core/macro` and `@lingui/react/macro`.

```sh
npx @lingui/codemods split-macro-imports <path>
```

Visit the [Migration guide from 4.x to 5.x](https://lingui.dev/introduction) for more information.

### jscodeshift options

To pass more options directly to jscodeshift, use `--jscodeshift="..."`. For example:
Expand Down