Skip to content

Commit

Permalink
chore: improve readme and ci (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrii-bodnar authored Jul 5, 2024
1 parent f712142 commit b6a8890
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
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

0 comments on commit b6a8890

Please sign in to comment.