{"name":"loop","version":"3.3.5","description":"loop through commands in fun and amazing ways!","main":"./index.js","bin":{"loop":"bin/loop"},"scripts":{"commit":"git-cz","lint":"prettier --write \"bin/*\" index.js","test":"npm run test-jest && npm run test-mocha","test-jest":"jest --config jest.json --coverage","test:coverage":"jest --config jest.json --coverage","test:watch":"jest --config jest.json --watch","test-mocha":"mocha"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS","pre-commit":"pretty-quick --staged"}},"keywords":["loop","command","commands"],"author":{"name":"hi@iammwattwalters.com"},"repository":{"type":"git","url":"git://github.com/mateodelnorte/loop.git"},"license":"ISC","dependencies":{"async":"^3.2.0","chalk":"^3.0.0","debug":"^4.3.2","lodash":"^4.17.21","meta-exec":"^1.4.2","should":"^13.2.3","yargs":"^14.2.3"},"devDependencies":{"@commitlint/cli":"8.3.5","@commitlint/config-conventional":"8.3.4","chai":"4.3.4","commitizen":"3.1.2","cz-conventional-changelog":"2.1.0","husky":"2.7.0","jest":"24.9.0","mkdirp":"0.5.5","mocha":"6.2.3","prettier":"1.19.1","pretty-quick":"1.11.1","tmp":"0.2.1","which":"1.3.1"},"gitHead":"76d22659eed2294cb4ab936b16cdf463db377b4c","bugs":{"url":"https://github.com/mateodelnorte/loop/issues"},"homepage":"https://github.com/mateodelnorte/loop#readme","_id":"loop@3.3.5","_nodeVersion":"15.14.0","_npmVersion":"7.7.6","dist":{"integrity":"sha512-WeUG/oA/+BVhxoLHCLc+YDOEoaApfX8T4uLJVsdAkvzkv0S+RecgG2UJc7Pue28stfHIL2Jv1/1Bujcj5qrcKQ==","shasum":"a4f43e88a54d2ec864077d8685178221626b81d0","tarball":"http://registry-npm.ywwl.com/loop/download/loop-3.3.5.tgz","fileCount":27,"unpackedSize":25446,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgeQVHCRA9TVsSAnZWagAA0HwQAI/x+JY7LMghmcBcit/5\nMWp376Dcc9e74wRWnf1W0f/eSpIZHupXiRF9FF6i8cB1lDviwHfD78PcnzpR\nmiTk2NBY+ugGHAnYRBJTVIkBLHO4m1NpZQZA3UOlMIdLHuvV3STsyN4xhRxn\nWLJIRHvFlH9BWqvWrpvS2iU0QLp2o6Qy/iTax9UDFK2/ev7+20jfphkftGQ9\n55+czfWtATrUUeR41l3JGz0lUmaKP0Ot09hw6yHa67HTVatvEHwLRSBDxDGw\nScL7pKaQi5+kR6mPGCDdO0uQaSgzpmnvGeXw/dkip5gaVxL7sA7fdnj0Qovb\nqlEQK307Nu9LiUY92ZS20OEoJPlQWqEJVgSi3dyEdO/C2HmxGPQiZuFq7EeB\nHqOfyUnjpFRor7nBLq+Z8NNoSH7TJVM2VFqCoSb1wKj4JGEOu8RwNtWOkkPJ\nKdI09jXrp6ZPf9fbEiJZG+kO9sAFxCpm1mLiZQQ32h8TfFI/Ovsc4E2HTOvi\nVxzgVhoWOCiJ65WxGsOUIpf+kOdwI+Vc3CEX7K2PqQmofQE60OYN34ivLoXT\nbd9ZfigvsdI6nLeLXzzxw80wqLr8xV9Wy/P/IF2gy3BNc9hjxzkkg18l0ydL\nrDN4593yQL5PFFov/B3fGCNoklpFpCS9KQhGzllMEe7V9p2dbp+XdfexdloO\noB7O\r\n=5A1B\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCOrXQ6bQfMRj3e2Z4g5zxY+tOJ/cNaj+PMazw3Kw+rhgIgaI+DVZ9Whd7CntcoSxWvDbGkhnZtsDBDbZy/mHxXUz0="}],"size":8055,"noattachment":false,"key":"/loop/-/loop-3.3.5.tgz"},"_npmUser":{"name":"patrickleet","email":"pat@patscott.io"},"directories":{},"maintainers":[{"name":"mateodelnorte","email":"mattwalters5@gmail.com"},{"name":"patrickleet","email":"pat@patscott.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/loop_3.3.5_1618543942500_0.7576570954781618"},"_hasShrinkwrap":false,"readme":"# loop\n[![Build Status](https://travis-ci.com/mateodelnorte/loop.svg?branch=master)](https://travis-ci.com/mateodelnorte/loop)\n\nloop expands commands to work simultaneously against any number of subdirectories in your current working path. Want to perform a `git status` on 15 projects at once? With loop, you can do it!\n\n```\n    loop executes a command against child directories within its current working directory\n\n    usage:\n\n      loop [command]                                      - execute a command against all child dirs\n      loop [\"command with multiple words in quotes\"]      - execute a multi-word command against all child dirs\n      loop --cwd ../other/working/directory               - execute a command against all child dirs, setting the working directory to another directory\n      loop --include comma,delimited,list,of,dirs         - execute a command against all child dirs including a number of directories which might otherwise be ignored, for instance, in .looprc\n      loop --include-only comma,delimited,list,of,dirs    - execute a command against all child dirs, ignoring .looprc, and only including the specified directories\n      loop --include-pattern 'regexp'                     - execute a command against all child dirs that match the regular expression\n      loop --exclude comma,delimited,list,of,dirs         - execute a command against all child dirs, excluding the specified directories\n      loop --exclude-only comma,delimited,list,of,dirs    - execute a command against all child dirs, excluding only the specified directories\n      loop --exclude-pattern 'regexp'                     - execute a command against all child dirs, excluding directories that match the regular expression\n      loop --init                                         - creates a .looprc in the current working directory\n\n    examples:\n\n      loop pwd\n      loop \"git status\"\n      loop \"git checkout -b feature/new-feature\"\n      loop \"git push origin feature/new-feature\"\n\n    .looprc:\n\n      directories containing a .looprc json file may have extra behavior, determined by properties within the file:\n\n        ignore (type Array) any child directory names listed in ignore will be ignored and skipped from execution\n\n    example .looprc:\n\n    {\n      \"ignore\": [ \".git\", \".vagrant\", \".vscode\", \"ansible\", \"node_modules\", \"scripts\" ]\n    }\n```\n\n## Installation\n\n`npm install -g loop`\n\n## Basic Usage\n\nloop installs a `loop` command which you can leverage from the command line, in your package.json scripts, etc. The syntax is super simple. Just `loop [your command]`. If the command you wish to run consists of multiple words, place the command in quotes: `loop \"your --you | really -R | long -o | command\"`. \n\nIn a folder with the following structure: \n```\n./git\n./bin\n./lib\n./node_modules\n./test\n./index.js\n./package.json\n```\n\nexecuting `loop pwd` yields the following results: \n```\n➜  nycnode-site git:(master) loop pwd\n\n.git\n/Users/mateodelnorte/development/nycnode/nycnode-site/.git\n\nlib\n/Users/mateodelnorte/development/nycnode/nycnode-site/lib\n\nnode_modules\n/Users/mateodelnorte/development/nycnode/nycnode-site/node_modules\n\ntest\n/Users/mateodelnorte/development/nycnode/nycnode-site/test\n```\n\n## .looprc\n\nloop can use a `.looprc` file to customize how loop behaves in a particular folder. Installing a `.looprc` file to a folder is simple: \n\n`loop --init` results in the following file being created: \n\n```\n{\n  \"ignore\": [ \".git\", \".vagrant\", \".vscode\", \"node_modules\" ]\n}\n```\n\nNow, when we perform the same command we did previously `loop pwd`, `loop` will recognize the `.looprc` file and see the `.git` folder is ignored - excluding it from the results: \n```\n➜  nycnode-site git:(master) loop pwd\n\nlib\n/Users/mateodelnorte/development/nycnode/nycnode-site/lib\n\nnode_modules\n/Users/mateodelnorte/development/nycnode/nycnode-site/node_modules\n\ntest\n/Users/mateodelnorte/development/nycnode/nycnode-site/test\n```\n\n## On to the Fun Stuff\n\nNeat, so now we can ignore folders that we don't work with directly. Imagine having a folder that contains all your project repositories for work. Wish you could find out how many files are in each? \n```\n➜  nycnode git:(master) ✗ loop \"find . -path ./node_modules -prune -o -type f  | wc -l\"\n\nnycnode-denormalizer\n125\n\nnycnode-meetup-ingestor\n148\n\nnycnode-site\n1106\n\nnycnode-user-ingestor\n103\n\nnycnode-youtube-ingestor\n81\n```\n\nBetter yet, what if you're starting a new feature that spans a distributed system composed of many microservices and a site or two? \n\n```\n➜  nycnode git:(master) ✗ loop \"git checkout master\"\n\nnycnode-denormalizer\nAlready on 'master'\n\nnycnode-meetup-ingestor\nAlready on 'master'\n\nnycnode-site\nAlready on 'master'\n\nnycnode-user-ingestor\nAlready on 'master'\n\nnycnode-youtube-ingestor\nAlready on 'master'\n\n➜  nycnode git:(master) ✗ loop \"git pull origin master\"\n\nnycnode-denormalizer\nFrom github.com:mateodelnorte/nycnode-denormalizer\n * branch            master     -> FETCH_HEAD\n\nnycnode-meetup-ingestor\nFrom github.com:mateodelnorte/nycnode-meetup-ingestor\n * branch            master     -> FETCH_HEAD\n\nnycnode-site\nFrom github.com:mateodelnorte/nycnode-site\n * branch            master     -> FETCH_HEAD\n\nnycnode-user-ingestor\nFrom github.com:mateodelnorte/nycnode-user-ingestor\n * branch            master     -> FETCH_HEAD\n\nnycnode-youtube-ingestor\nFrom github.com:mateodelnorte/nycnode-youtube-ingestor\n * branch            master     -> FETCH_HEAD\n \n➜  nycnode git:(master) ✗ loop \"git checkout -b feature/my-new-feature\"\n\nnycnode-denormalizer\nSwitched to a new branch 'feature/my-new-feature'\n\nnycnode-meetup-ingestor\nSwitched to a new branch 'feature/my-new-feature'\n\nnycnode-site\nSwitched to a new branch 'feature/my-new-feature'\n\nnycnode-user-ingestor\nSwitched to a new branch 'feature/my-new-feature'\n\nnycnode-youtube-ingestor\nSwitched to a new branch 'feature/my-new-feature'\n```\n\nNow you're ready to code away across your whole system! `loop \"git status\"` will show you your status across all repos. `loop \"git diff\"`, `loop \"git push origin feature/my-new-feature\"`, and other commands all work like you'd think!\n\n## TODO: \n- plugins\n","publish_time":1618543942736,"_cnpm_publish_time":1618543942736,"dist-tags":{"latest":"3.3.6"}}