@putout/cli-match
convert "rules" section to "match" in .putout.json
Last updated 3 years ago by coderaiser .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @putout/cli-match 
SYNC missed versions from official npm registry.

@putout/cli-match NPM version

Read .putout.json and convert rules into match.

Install

npm i @putout/cli-match
{
-   "rules": {
-       "remove-debugger": "on"
+   "match": {
+       "*.md": {
+           "remove-debugger": "on"
+       }
    }
}

Example

import {cwd} from 'node:process';
import {readFile, writeFile} from 'node:fs/promises';
import match from '@putout/cli-match';

const {code, message} = await match({
    pattern,
    cwd: cwd(),
    readFile, // optional
    writeFile, // optional
});

console.log(message);
process.exit(code);

License

MIT

Current Tags

  • 3.0.1                                ...           latest (3 months ago)

7 Versions

  • 3.0.1                                ...           3 months ago
  • 3.0.0                                ...           3 months ago
  • 2.2.1                                ...           3 months ago
  • 2.2.0                                ...           3 years ago
  • 2.0.0                                ...           3 years ago
  • 1.0.1                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 0
Dependencies (2)
Dev Dependencies (11)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |