An open API service indexing awesome lists of open source software.

https://github.com/obweger/modster-plugin-hello-world

A very simple plugin for Modster. Take your Modster plugin development from here!
https://github.com/obweger/modster-plugin-hello-world

codemod codemods modster modster-plugin

Last synced: 2 months ago
JSON representation

A very simple plugin for Modster. Take your Modster plugin development from here!

Awesome Lists containing this project

README

          

# modster-plugin-hello-world

A very simple plugin for [Modster](https://github.com/obweger/modster). Take your Modster plugin development from here! ✌️

![Modster, Baby.](./assets/screenshot.png)

## Installation

```shell
npm install modster-plugin-hello-world
```

In your `.codemods.js`:

```diff
module.exports = {
// ...
plugins: [
// ...
+ 'hello-world'
]
}
```

## Codemods

### Rename variables

Renames all variables of name `--from` to `--to`.

With `--from=foo` and `--to=bar`:

```diff
- const foo = 'bar';
+ const bar = 'bar';
```

### Change import source

Changes all import statement with source `--from` to `--to`.

With `--from=foo` and `--to=bar`:

```diff
- import bar from 'foo';
+ import bar from 'bar';
```