Skip to content

CLI tool to download source of a rule and fixtures from šŸŠPutout Editor and generate tests from it.

License

Notifications You must be signed in to change notification settings

putoutjs/redput

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 

Repository files navigation

RedPut License NPM version Build Status Coverage 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"]
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:

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

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published