Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/civicsource/codemod
Random codemods that we have run
https://github.com/civicsource/codemod
Last synced: 3 months ago
JSON representation
Random codemods that we have run
- Host: GitHub
- URL: https://github.com/civicsource/codemod
- Owner: civicsource
- License: mit
- Created: 2017-05-12T15:12:21.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-05-12T15:12:36.000Z (almost 8 years ago)
- Last Synced: 2024-05-21T13:55:37.580Z (9 months ago)
- Language: JavaScript
- Size: 1.95 KB
- Stars: 0
- Watchers: 18
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-codemods - civicsource/codemod
README
# Codemod Scripts
This repo contains some random [jscodeshift](https://github.com/facebook/jscodeshift) code mods we have run against the CivicSource codebase. Keeping them for posterity.
## How to Use
Just copy whatever codemod script you want to the root of wherever you want to run it. Then just run:
```
jscodeshift path/to/files/to/transform -t ./my-transform-file.js
```### `kill-app.js`
We used to have `app` aliased to a specific subfolder in the project. This caused problems when validating our code with [eslint-plugin-import](https://github.com/benmosher/eslint-plugin-import). This codemod replaces all instances of `app/whatever` with the correct relative path, e.g. `./../../whatever` depending on the file's location on the filesystem.