Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/putoutjs/redput
CLI tool to download source of a rule and fixtures from 🐊Putout Editor and generate tests from it.
https://github.com/putoutjs/redput
Last synced: 15 days ago
JSON representation
CLI tool to download source of a rule and fixtures from 🐊Putout Editor and generate tests from it.
- Host: GitHub
- URL: https://github.com/putoutjs/redput
- Owner: putoutjs
- License: mit
- Created: 2023-07-28T21:09:31.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-07-19T14:38:02.000Z (5 months ago)
- Last Synced: 2024-11-06T12:56:26.526Z (about 2 months ago)
- Language: JavaScript
- Homepage:
- Size: 93.8 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: ChangeLog
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# RedPut [![License][LicenseIMGURL]][LicenseURL] [![NPM version][NPMIMGURL]][NPMURL] [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Coverage Status][CoverageIMGURL]][CoverageURL]
[NPMURL]: https://npmjs.org/package/redput "npm"
[NPMIMGURL]: https://img.shields.io/npm/v/redput.svg?style=flat
[BuildStatusURL]: https://github.com/putoutjs/redput/actions/workflows/nodejs.yml "Build Status"
[BuildStatusIMGURL]: https://github.com/putoutjs/redput/actions/workflows/nodejs.yml/badge.svg
[LicenseURL]: https://tldrlegal.com/license/mit-license "MIT License"
[LicenseIMGURL]: https://img.shields.io/badge/license-MIT-317BF9.svg?style=flat
[CoverageURL]: https://coveralls.io/github/putoutjs/redput?branch=master
[CoverageIMGURL]: https://coveralls.io/repos/putoutjs/redput/badge.svg?branch=master&service=githubCLI tool to download source of a `rule` and `fixtures` from 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/33a75dce299788583a567e02f29828c8/7a97049f1c88ef9e3396d43b6a64246da0093670) and generate tests from it.
## Install
```
npm i redput -g
```# Usage
```sh
GITHUB_TOKEN=github-token redput [putout-editor-url]
````redput` determines where it located and does one of next things:
- if it finds `index.js` - creates rule inside nested plugin;
- creates directory with a plugin name and fills directories `lib`, `test` and `fixture`;example of input:
```js
// ["off", "write-all-files"]
export const report = () => `Write all files`;export const fix = (file) => {
const content = readFileContent(file);
writeFileContent(file, content);
};export const scan = (root, {push}) => {
findFile(root, ['*']).map(push);
};
```When you get your rule downloaded, use:
```sh
UPDATE=1 npm fix:lint test
```to finish preparations of new rule and tests.
## License
MIT