@anemone/codemod
v0.0.3
Published
Upgrade EdgeDB code to Gel
Readme
Codemod
- CLI entry point is
cli.ts scriptshas custom scripts like changing file names, etc.transformscontains different codemod scripts (imported and used intransforms/index.ts)__tests__contains tests for the codemod__testfixtures__contains test fixtures
Usage
yarn codemod <path-to-directory>Tests
yarn testTests setup follows the jscodeshift documentation.
Development
JSCodeShift transforms:
- Add a new transform in
transformsdirectory, e.g.transforms/my-transform.ts - Add a corresponding unit test in
__tests__directory, e.g.__tests__/my-transform.spec.ts - Add test fixtures in
__testfixtures__directory, e.g.__testfixtures__/my-transform/basic.input.tsand__testfixtures__/my-transform/basic.output.ts - Add a new entry in
transforms/index.tsto use the new transform - Run tests with
yarn test
Custom scripts:
- Add a new script in
scriptsdirectory, e.g.scripts/my-script.ts - Use it in
cli.ts
