{"name":"@putout/plugin-madrun","version":"24.2.1","keywords":["putout","putout-plugin","plugin","madrun"],"author":{"url":"https://github.com/coderaiser","name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"license":"MIT","_id":"@putout/plugin-madrun@24.2.1","maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-madrun#readme","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"tag":false,"dist":{"shasum":"c4997f927521280e7a81c1989efdc26a70330338","tarball":"http://registry-npm.ywwl.com/@putout/plugin-madrun/download/@putout/plugin-madrun-24.2.1.tgz","fileCount":29,"integrity":"sha512-Hbq15lVTWAqZaX5JyAR7HfOJJ5CcXTZK30wcADzZ9/H9Z0lCeFKYEPbyXli2u7hdMl54drTsoioOYeFYL8PZSw==","signatures":[{"sig":"MEQCIGCXopq3rB8AELuEZlHKw79AAQxtDhalPJsH9mR/Uf+ZAiBm72GquynYOH8mAzwfwQ/xAqUQC358V6mGe4eeVhfejQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":39007,"size":9108,"noattachment":false,"key":"/@putout/plugin-madrun/-/@putout/plugin-madrun-24.2.1.tgz"},"main":"lib/index.js","type":"module","engines":{"node":">=22"},"gitHead":"8a07edc628e07931f2df4a5ecbdad4572ac2d5ef","release":false,"scripts":{"lint":"madrun lint","test":"madrun test","report":"madrun report","coverage":"madrun coverage","fix:lint":"madrun fix:lint","fresh:lint":"madrun fresh:lint","lint:fresh":"madrun lint:fresh","watch:test":"madrun watch:test"},"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"changelog":false,"repository":{"url":"git+https://github.com/coderaiser/putout.git","type":"git"},"_npmVersion":"11.4.2","description":"🐊Putout plugin adds ability to transform madrun scripts","directories":{},"_nodeVersion":"26.5.0","dependencies":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^10.0.0","madrun":"^13.0.0","nodemon":"^3.0.1","superc8":"^12.0.0","@putout/test":"^15.0.0","@putout/eslint-flat":"^4.0.0","eslint-plugin-putout":"^31.0.0","@putout/plugin-nodejs":"*","@putout/plugin-remove-unused-expressions":"*"},"peerDependencies":{"putout":">=42"},"_npmOperationalInternal":{"tmp":"tmp/plugin-madrun_24.2.1_1783934143393_0.2923970796521944","host":"s3://npm-registry-packages-npm-production"},"readme":"# @putout/plugin-madrun [![NPM version][NPMIMGURL]][NPMURL]\n\n[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-madrun.svg?style=flat&longCache=true\n[NPMURL]: https://npmjs.org/package/@putout/plugin-madrun \"npm\"\n\n> CLI tool to run multiple npm-scripts in a madly comfortable way.\n>\n> (c) [**Madrun**](https://github.com/coderaiser/madrun)\n\n🐊[**Putout**](https://github.com/coderaiser/putout) plugin adds ability to fix issues with**Madrun** config file.\n\n## Install\n\n```\nnpm i putout @putout/plugin-madrun -D\n```\n\n## Rules\n\n- ✅ [add-cut-env](#add-cut-env);\n- ✅ [add-fix-lint](#add-fix-lint);\n- ✅ [add-function](#add-function);\n- ✅ [add-missing-quotes-to-watcher](#add-missing-quotes-to-watcher);\n- ✅ [add-run](#add-run);\n- ✅ [call-run](#call-run);\n- ✅ [convert-args-to-scripts](#convert-args-to-scripts);\n- ✅ [convert-cut-env-to-run](#convert-cut-env-to-run);\n- ✅ [convert-lint-lib](#convert-lint-lib);\n- ✅ [convert-nyc-to-c8](#convert-nyc-to-c8)\n- ✅ [convert-run-argument](#convert-run-argument);\n- ✅ [convert-run-to-cut-env](#convert-run-to-cut-env);\n- ✅ [convert-prepublish-only-to-wisdom](#convert-prepublish-only-to-wisdom);\n- ✅ [convert-to-async](#convert-to-async);\n- ✅ [declare](#declare);\n- ✅ [remove-check-duplicates-from-test](#remove-check-duplicates-from-test);\n- ✅ [remove-putout](#remove-putout);\n- ✅ [remove-useless-array-in-run](#remove-useless-array-in-run);\n- ✅ [remove-useless-string-conversion](#remove-useless-string-conversion);\n- ✅ [rename-eslint-to-putout](#rename-eslint-to-putout);\n- ✅ [rename-series-to-run](#rename-series-to-run);\n- ✅ [set-lint-dot](#set-lint-dot);\n- ✅ [set-report-lcov](#set-report-lcov);\n- ✅ [insert-test-dts](#insert-test-dts);\n\n## File rules\n\n- ✅ [rename-file](#rename-file);\n\n## Config\n\n```json\n{\n    \"rules\": {\n        \"madrun/add-function\": \"on\",\n        \"madrun/add-fix-lint\": \"on\",\n        \"madrun/add-run\": \"on\",\n        \"madrun/add-missing-quotes-to-watcher\": \"on\",\n        \"madrun/add-cut-env\": \"on\",\n        \"madrun/call-run\": \"on\",\n        \"madrun/convert-run-argument\": \"on\",\n        \"madrun/convert-args-to-scripts\": \"on\",\n        \"madrun/convert-run-to-cut-env\": \"on\",\n        \"madrun/convert-cut-env-to-run\": \"on\",\n        \"madrun/convert-prepublish-only-to-wisdom\": \"on\",\n        \"madrun/rename-file\": \"off\",\n        \"madrun/rename-series-to-run\": \"on\",\n        \"madrun/rename-eslint-to-putout\": \"on\",\n        \"madrun/set-lint-dot\": \"on\",\n        \"madrun/convert-to-async\": \"on\",\n        \"madrun/convert-nyc-to-c8\": \"on\",\n        \"madrun/set-report-lcov\": \"on\",\n        \"madrun/remove-check-duplicates-from-test\": \"on\",\n        \"madrun/remove-useless-array-in-run\": \"on\",\n        \"madrun/remove-useless-string-conversion\": \"on\",\n        \"madrun/insert-test-dts\": \"off\"\n    }\n}\n```\n\n## add-function\n\n### ❌ Example of incorrect code\n\n```js\nmodule.exports = {\n    hello: 'world',\n};\n```\n\n### ✅ Example of correct code\n\n```js\nmodule.exports = {\n    hello: () => 'world',\n};\n```\n\n## add-fix-lint\n\n### ❌ Example of incorrect code\n\n```js\nconst {run} = require('madrun');\n\nmodule.exports = {\n    lint: 'putout lib test',\n};\n```\n\n### ✅ Example of correct code\n\n```js\nconst {run} = require('madrun');\n\nmodule.exports = {\n    'lint': 'putout lib test',\n    'fix:lint': run('lint', '--fix'),\n};\n```\n\n## add-missing-quotes-to-watcher\n\nCheckout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/cf8431088953395b51e827f005c66d2c/dffe20ab71d35eb70aebe191f27c8d34224fa8a4).\n\n### ❌ Example of incorrect code\n\n```js\nexport default {\n    'watch:test': async () => await run('watcher', await run('test')),\n};\n```\n\n### ✅ Example of correct code\n\n```js\nexport default {\n    'watch:test': async () => await run('watcher', `\"${await run('test')}\"`),\n};\n```\n\n## add-run\n\n### ❌ Example of incorrect code\n\n```js\nmodule.exports = {\n    lint: 'putout lib test',\n};\n```\n\n### ✅ Example of correct code\n\n```js\nconst {run} = require('madrun');\n\nmodule.exports = {\n    lint: 'putout lib test',\n};\n```\n\n## add-cut-env\n\n### ❌ Example of incorrect code\n\n```js\nexport default {\n    'test': () => [env, 'test:only'],\n    'test:only': () => [env, 'npm test'],\n};\n```\n\n### ✅ Example of correct code\n\n```js\nimport {cutEnv} from 'madrun';\n\nexport default {\n    'test': async () => [testEnv, await cutEnv('test:only')],\n    'test:only': () => [env, 'npm test'],\n};\n```\n\n## convert-run-argument\n\n### ❌ Example of incorrect code\n\n```js\nmodule.exports = {\n    hello: () => run(['a']),\n};\n```\n\n### ✅ Example of correct code\n\n```js\nmodule.exports = {\n    hello: () => run('a'),\n};\n```\n\n## convert-args-to-scripts\n\nCheck out in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/bc9afe77c9853716392f812b5000fbbb/e290c6d41f8a31c81ce4b81e1c1ccec78a319e27).\n\n### ❌ Example of incorrect code\n\n```js\nexport default {\n    build: () => 'tsup',\n    wisdom: () => run('build', 'test', 'test:dts'),\n};\n```\n\n### ✅ Example of correct code\n\n```js\nexport default {\n    build: () => 'tsup',\n    wisdom: () => run(['build', 'test', 'test:dts']),\n};\n```\n\n## convert-run-to-cut-env\n\n### ❌ Example of incorrect code\n\n```js\nexport default {\n    'test': () => [env, 'npm test'],\n    'test:only': () => 'npm test',\n    'coverage': async () => [env, await run('test')],\n    'coverage:only': async () => [env, await run('test:only')],\n};\n```\n\n### ✅ Example of correct code\n\n```js\nexport default {\n    'test': () => [env, 'npm test'],\n    'test:only': () => 'npm test',\n    'coverage': async () => [env, await cutEnv('test')],\n    'coverage:only': async () => [env, await run('test:only')],\n};\n```\n\n## convert-cut-env-to-run\n\n### ❌ Example of incorrect code\n\n```js\nexport default {\n    'test': () => [env, 'npm test'],\n    'test:only': () => 'npm test',\n    'coverage': async () => [env, await cutEnv('test')],\n    'coverage:only': async () => [env, await cutEnv('test:only')],\n};\n```\n\n### ✅ Example of correct code\n\n```js\nexport default {\n    'test': () => [env, 'npm test'],\n    'test:only': () => 'npm test',\n    'coverage': async () => [env, await cutEnv('test')],\n    'coverage:only': async () => [env, await run('test:only')],\n};\n```\n\n## convert-prepublish-only-to-wisdom\n\nCheckout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/cddcdafd9ea8e040f73d52db81967a08/547fb42bdf4c4f46510488382202b0e23c5f9770).\n\n### ❌ Example of incorrect code\n\n```js\nexport default {\n    'prepublishOnly': () => run(['lint', 'test']),\n    'test:dts': 'check-dts test/*.ts',\n};\n```\n\n### ✅ Example of correct code\n\n```js\nexport default {\n    'wisdom': () => run(['lint', 'test']),\n    'test:dts': 'check-dts test/*.ts',\n};\n```\n\n## rename-eslint-to-putout\n\n### ❌ Example of incorrect code\n\n```js\nmodule.exports = {\n    lint: 'eslint lib test --ignore test/fixture',\n};\n```\n\n### ✅ Example of correct code\n\n```js\nmodule.exports = {\n    lint: 'putout lib test',\n};\n```\n\n## rename-file\n\nRename `madrun.js` to `.madrun.js` when located near `package.json`.\nCheckout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/9ad3c6ce273e4da4f0ff5dad8f611e98/9c6ed0b661ee7361919b14ec2a7f7666098e9199).\n\n```\n-madrun.js\n+.madrun.js\n```\n\n## set-lint-dot\n\n### ❌ Example of incorrect code\n\n```js\nmodule.exports = {\n    lint: 'putout lib test',\n};\n```\n\n### ✅ Example of correct code\n\n```js\nmodule.exports = {\n    lint: 'putout .',\n};\n```\n\n## convert-to-async\n\n### ❌ Example of incorrect code\n\n```js\nmodule.exports = {\n    lint: () => String(run('hello')),\n};\n```\n\n### ✅ Example of correct code\n\n```js\nmodule.exports = {\n    lint: async () => String(await run('hello')),\n};\n```\n\n## convert-nyc-to-c8\n\n### ❌ Example of incorrect code\n\n```js\nexport default {\n    coverage: () => 'nyc npm test',\n    report: () => `nyc report --reporter=text-lcov | coveralls`,\n};\n```\n\n### ✅ Example of correct code\n\n```js\nexport default {\n    coverage: () => 'c8 npm test',\n    report: 'c8 report --reporter=lcov',\n};\n```\n\n## set-report-lcov\n\n### ❌ Example of incorrect code\n\n```js\nexport default {\n    report: () => `c8 report --reporter=text-lcov | coveralls || true`,\n};\n```\n\n### ✅ Example of correct code\n\n```js\nexport default {\n    report: 'c8 report --reporter=lcov',\n};\n```\n\n## remove-check-duplicates-from-test\n\n### ❌ Example of incorrect code\n\n```js\nexport default {\n    test: () => 'tape -d *.js',\n};\n```\n\n### ✅ Example of correct code\n\n```js\nexport default {\n    test: () => 'tape *.js',\n};\n```\n\n## remove-useless-array-in-run\n\nCheckout in [🐊**Putout Editor**](https://putout.cloudcmd.io/#/gist/84c7838a6099a281a370809e51997212/356cbf9050bee7205eb670aa807b336fc28340f7).\n\n### ❌ Example of incorrect code\n\n```js\nexport default {\n    time: async () => await run(['lint:fresh', '-f time']),\n};\n```\n\n### ✅ Example of correct code\n\n```js\nexport default {\n    time: async () => await run('lint:fresh', '-f time'),\n};\n```\n\n## remove-useless-string-conversion\n\nCheckout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/6fd51ff9244bda07919ddacfb07d32d2/4c4ed5336c1bbef6fba47ff61f3558a87435443c).\n\n### ❌ Example of incorrect code\n\n```js\nexport default {\n    time: async () => [testEnv, String(await cutEnv('test:raw'))],\n};\n```\n\n### ✅ Example of correct code\n\n```js\nexport default {\n    time: async () => [testEnv, await cutEnv('test:raw')],\n};\n```\n\n## declare\n\n### ❌ Example of incorrect code\n\n```js\nexport default {\n    coverage: async () => [env, `c8 ${await cutEnv('test')}`],\n};\n```\n\n### ✅ Example of correct code\n\n```js\nimport {cutEnv} from 'madrun';\n\nexport default {\n    coverage: async () => [env, `c8 ${await cutEnv('test')}`],\n};\n```\n\n## insert-test-dts\n\nCheckout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/b6261f1f7405af95185b9e18431e1dcc/18ba644eb07263268aec964065a0e58c38e859d2).\n\n### ❌ Example of incorrect code\n\n```js\nexport default {\n    'wisdom': () => run(['lint', 'coverage']),\n    'fix:lint': () => run('lint', '--fix'),\n    'test': () => `tape 'test/*.js' 'lib/**/*.spec.js'`,\n};\n```\n\n### ✅ Example of correct code\n\n```js\nexport default {\n    'wisdom': () => run(['lint', 'coverage', 'test:dts']),\n    'fix:lint': () => run('lint', '--fix'),\n    'test': () => `tape 'test/*.js' 'lib/**/*.spec.js'`,\n    'test:dts': () => 'check-dts test/*.ts',\n};\n```\n\n## License\n\nMIT\n","publish_time":1783934143537,"_cnpm_publish_time":1783934143537,"dist-tags":{"latest":"24.3.0"}}