Skip to content

Repository files navigation

RedPut LicenseNPM versionBuild StatusCoverage Status

CLI tool to download source of a rule and fixtures from 🐊Putout Editor and generate tests from it.

Install

npm i redput -g

Usage

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:

// ["off", "write-all-files"]exportconstreport=()=>`Write all files`;exportconstfix=(file)=>{constcontent=readFileContent(file);writeFileContent(file,content);};exportconstscan=(root,{push})=>{findFile(root,['*']).map(push);};

When you get your rule downloaded, use:

UPDATE=1 npm fix:lint test

to finish preparations of new rule and tests.

License

MIT

About

CLI tool to download source of a rule and fixtures from 🐊Putout Editor and generate tests from it.

Resources

Code of conduct

Contributing

Stars

2 stars

Watchers

1 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages