{"name":"@putout/plugin-madrun","version":"19.0.0","type":"commonjs","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"🐊Putout plugin adds ability to transform madrun scripts","homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-madrun#readme","main":"lib/index.js","release":false,"tag":false,"changelog":false,"repository":{"type":"git","url":"git://github.com/coderaiser/putout.git"},"scripts":{"test":"madrun test","watch:test":"madrun watch:test","lint":"madrun lint","fresh:lint":"madrun fresh:lint","lint:fresh":"madrun lint:fresh","fix:lint":"madrun fix:lint","coverage":"madrun coverage","report":"madrun report"},"dependencies":{},"keywords":["putout","putout-plugin","plugin","madrun"],"devDependencies":{"@putout/plugin-nodejs":"*","@putout/plugin-remove-unused-expressions":"*","@putout/test":"^11.0.0","c8":"^10.0.0","eslint":"^9.0.0","eslint-plugin-n":"^17.0.0","eslint-plugin-putout":"^23.0.0","lerna":"^6.0.1","madrun":"^10.0.0","nodemon":"^3.0.1"},"peerDependencies":{"putout":">=36"},"license":"MIT","engines":{"node":">=18"},"publishConfig":{"access":"public"},"_id":"@putout/plugin-madrun@19.0.0","gitHead":"d5282662aac9eb1faad682f928aa8a0f8acb3c98","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_nodeVersion":"22.9.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-zz6lxOYVCSsPNc4rJOAyWs1JCPstFlUXG/+HSJl495sg1SU5S5kCKviT7na0wZH8/YPBvUleltXycU3RvB6soA==","shasum":"8edf5070887e2dddb7070f00fbee694935a7e8cf","tarball":"http://registry-npm.ywwl.com/@putout/plugin-madrun/download/@putout/plugin-madrun-19.0.0.tgz","fileCount":25,"unpackedSize":32508,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDxIAsKeKoOckEipDEZat24kpLjf+tA9SLUV6Z7TWiO5AIgLYbFmfY92lhsqm5hNCkEaP24QO8F7aW/KAHtnnyMOt4="}],"size":7645,"noattachment":false,"key":"/@putout/plugin-madrun/-/@putout/plugin-madrun-19.0.0.tgz"},"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-madrun_19.0.0_1727255248738_0.8535326066564448"},"_hasShrinkwrap":false,"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\n**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-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-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\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-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/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    }\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-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## 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## 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## License\n\nMIT\n","publish_time":1727255248921,"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"_cnpm_publish_time":1727255248921,"dist-tags":{"latest":"24.3.0"}}