{"_id":"@architect/arc-macro-node-prune","_rev":"9-bc35edbc4292d7d9ccc8686f9e412f95","name":"@architect/arc-macro-node-prune","dist-tags":{"latest":"1.0.0"},"versions":{"0.0.2":{"name":"@architect/arc-macro-node-prune","version":"0.0.2","keywords":["amazon","api gateway","arc","architect","aws","ci","cloud functions","cloud","deployment","lambda","macro","node_modules","npm","plugin","serverless"],"author":{"name":"Ryan Block"},"license":"Apache-2.0","_id":"@architect/arc-macro-node-prune@0.0.2","maintainers":[{"name":"brianleroux","email":"b@brian.io"},{"name":"dam","email":"kristoferjoseph@gmail.com"},{"name":"kborchers","email":"kris.borchers@gmail.com"},{"name":"ryanblock","email":"rblock+npm@gmail.com"}],"homepage":"https://arc.codes","bugs":{"url":"https://github.com/architect-examples/arc-macro-node-prune/issues"},"dist":{"shasum":"9f8d84928170d1dd7c2772ba1cf5eba9f44a24f9","tarball":"https://registry.npmjs.org/@architect/arc-macro-node-prune/-/arc-macro-node-prune-0.0.2.tgz","fileCount":6,"integrity":"sha512-L9fSykNGC2QPHNmYtfoo5ygTjYjy/eKay5bv5jMYq33OBrjQfeVk0rQ76+EHwBvPfsOKe5u3syh+kka688Uu/A==","signatures":[{"sig":"MEYCIQDaSRG5OxKmnpTPOGmLLVUFxwesWNaVZBFS3U/hAPlPowIhANVPdzdX6ezD1+U9vPiefYhCsuvahXYF7iSKtwht3qnM","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":21322,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeZZzACRA9TVsSAnZWagAAXBIP/1C8vUR6yEKcRfDwgLkv\nW69UBNeMM0zdu/KHHaZojfeKMmUgufzmxEifTaRHw7VnlUi+wb/w0MQZLvru\ncqdhZTPj6v1FtWlYyfb8SFdQ44WAlOmtiHMIhVAhRaArBdgCxGJ0fSuq997B\nHW0O82t9dKyD+GAyJATV2XMqsEYyXIMs0NeBize4pGyUw3P7LzeiyqVtJ5ES\n56nUKRwqqq0Sq3QatyTguUq2YR3EIQF+fLDrcys1r7zvvu5haIvY47i7lD14\nFTKVehkZiFFFPAklCNEIQ6B1YUkIWvBsTVmgdKGeV1mrT/Ng9wSyQAGDKpU3\ny9IZjm/f+dZGNjN5lRxzTvlDzkABMQro16doWDLYwAwxednQxkXq6e3Bg+bF\ntgk5GWY2PhlsgOin7oym9Gwp/dsxWhAN9rdnKsxKEQFBAy099CjB4oY6Pxb4\n9M0vuvOnjo90+C0/mHfDOOL8ptpGxXm9A6bgwe18WHwVgeLnbzKdRTYdO98Z\nVU801LpTTRC+X5v8+2gEMRqjDB25bDOtS4j38XMFPDoNnqk1reRqnrFt1f94\npnFjiC5aCKDZEIs9lVdLsGMIUzhCQDVSio83Xo47SD/C5187D1MlUCngNrhb\nA+noaARAR49mxLEaL+SuB2AnEAZi5hUFIJ3RQ+vCLCNuHwgdBkCyCPQF/dJL\nTXgx\r\n=JW3M\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","engines":{"node":">=10.0.0"},"gitHead":"c9a11311cf6cd9aeb6149aa9779a64c1c676ec65","scripts":{"lint":"eslint . --fix","test":"npm run lint"},"_npmUser":{"name":"ryanblock","email":"rblock+npm@gmail.com"},"deprecated":"Package has been renamed & moved to @architect/macro-node-prune","repository":{"url":"git+https://github.com/architect-examples/arc-macro-node-prune.git","type":"git"},"_npmVersion":"6.13.4","description":"Architect serverless framework macro that cleans node_modules cruft from your cloud functions during deployment","directories":{},"_nodeVersion":"12.14.1","dependencies":{"@architect/utils":"~1.4.7"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^6.8.0"},"_npmOperationalInternal":{"tmp":"tmp/arc-macro-node-prune_0.0.2_1583717567712_0.24826556048433468","host":"s3://npm-registry-packages"}},"0.0.3":{"name":"@architect/arc-macro-node-prune","version":"0.0.3","keywords":["amazon","api gateway","arc","architect","aws","ci","cloud functions","cloud","deployment","lambda","macro","node_modules","npm","plugin","serverless"],"author":{"name":"Ryan Block"},"license":"Apache-2.0","_id":"@architect/arc-macro-node-prune@0.0.3","maintainers":[{"name":"brianleroux","email":"b@brian.io"},{"name":"dam","email":"kristoferjoseph@gmail.com"},{"name":"kborchers","email":"kris.borchers@gmail.com"},{"name":"ryanblock","email":"rblock+npm@gmail.com"}],"homepage":"https://arc.codes","bugs":{"url":"https://github.com/architect-examples/arc-macro-node-prune/issues"},"dist":{"shasum":"a9fb5dd7863ecaf0639e293fe3e2414fb6894358","tarball":"https://registry.npmjs.org/@architect/arc-macro-node-prune/-/arc-macro-node-prune-0.0.3.tgz","fileCount":6,"integrity":"sha512-0XXvdJl0TAfbem6SWI44hRHib80nanawfKZ2H7OVUwHB6ohb+cFwK5WtIF8r+59vsce6UOkDiqQOmEfeZxCBBQ==","signatures":[{"sig":"MEUCIE+aYj1CWcXvbRiEaBSZJTNHcOGogwsWNUlU2wTtxXXPAiEA3yVo5KB2okr1qBYA+VxhSzxw1mrASTcKMpy5kz0MRss=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":21322,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeZZ6HCRA9TVsSAnZWagAAZEUP/jt06DS6sgIaWOB4FO78\np/BidGOteVObcgl9HOv/41TVssVDMK/dHTIO+2CFQBV9ipQ7BBltqYiJFR7b\nwicBuiepTFvXosgOLrntR84lMn76wbiIq9CsAXXGefmrrCnKLIq10RxfJsqb\nhlRilgcMvo/ms3nPE9wfk+wIXKebLDG0XavqQMCMHq4WSLIxZfl660WbSpVR\nlM+k6P439EaFbGwrrm3DPp9IfQf+Ot3VHvyosZ+h/U1bj6zqsPpKYzvAx5RA\nLzJzyh8COVDe4b5la26XJit04NdSh+4SZfXbjiCTOkdaE/aptSJfHAAmygKL\n/R8bnFTafAEyp5floUrz/L9Rw8ngDnqHbI1fO725uu5moLMKgpSpHiYEeAuJ\nCkglEw4sOCpgNKvKM4bY5zp5YUlYfyeLZ9fFvVWqUSqaPykSPYgB8E6AYrn/\nLpzjT3B+MbLtxjsU3vN4fuz97EhUYzC5NpTi+O6qhZjaqDtzyGkOU4FLlpII\nx0AdjSuix5u+A/nM9MRetz6w/9frRRJ2bj8Z9eOO3Tb/qBV4/spi8YVuh9uS\njUPajovjucx+bnivyT85NNM516VbNXXrNbZZeBj34rxe3zcZokmlAKPA7aWr\nQlqaJZKKhG7P0fd1yS9DF2P2UCONzJtLJgW/zU36tB9kLXBVuJfTr8J7neEk\nr9/3\r\n=Lq+C\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","engines":{"node":">=10.0.0"},"gitHead":"a45c0458e5fb079efd2f6d0ac0048c6d407ac6ae","scripts":{"lint":"eslint . --fix","test":"npm run lint"},"_npmUser":{"name":"ryanblock","email":"rblock+npm@gmail.com"},"deprecated":"Package has been renamed & moved to @architect/macro-node-prune","repository":{"url":"git+https://github.com/architect-examples/arc-macro-node-prune.git","type":"git"},"_npmVersion":"6.13.4","description":"Architect serverless framework macro that cleans node_modules cruft from your cloud functions during deployment","directories":{},"_nodeVersion":"10.19.0","dependencies":{"@architect/utils":"~1.4.7"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^6.8.0"},"_npmOperationalInternal":{"tmp":"tmp/arc-macro-node-prune_0.0.3_1583718023223_0.749478938349154","host":"s3://npm-registry-packages"}},"0.0.4":{"name":"@architect/arc-macro-node-prune","version":"0.0.4","keywords":["amazon","api gateway","arc","architect","aws","ci","cloud functions","cloud","deployment","lambda","macro","node_modules","npm","plugin","serverless"],"author":{"name":"Ryan Block"},"license":"Apache-2.0","_id":"@architect/arc-macro-node-prune@0.0.4","maintainers":[{"name":"brianleroux","email":"b@brian.io"},{"name":"dam","email":"kristoferjoseph@gmail.com"},{"name":"kborchers","email":"kris.borchers@gmail.com"},{"name":"ryanblock","email":"rblock+npm@gmail.com"}],"homepage":"https://arc.codes","bugs":{"url":"https://github.com/architect/arc-macro-node-prune/issues"},"dist":{"shasum":"d593a8db590caff4ccf8161a200847e15ec6b491","tarball":"https://registry.npmjs.org/@architect/arc-macro-node-prune/-/arc-macro-node-prune-0.0.4.tgz","fileCount":6,"integrity":"sha512-ecDAIa51iuSy6WnOvQRHHnzeTDdIQGjhiuwIVHkoRhaZo+uxTUJOr9SaBGPmMm7nbtmgYqe77HdJ1mAw9OQcEw==","signatures":[{"sig":"MEQCIF7HrbZhA3zCtDqDJC1k1Fb+jmHFJhi0vTnHuklQxrVVAiA4qbGrH8k0O3w/7AfjN7vfHBVgm9Ni+pm9CpSbtVcDcg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":21295,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeZaEBCRA9TVsSAnZWagAAjXQP/3E80Aoney4vsJAy+WRP\nfW7Dket0CnrIwJ+P5TVaJasJQ8VU5/nNnmZx8e3iXpbiKtlAYTS37DkrJgle\nUcjzuNCfd7HMaAUDdqOFQYqP8i4MMc3F4ajTJgGZbHQ/IiYVjY1rJ+rmG2eM\nsWTMb6Lxisyw0KRv2UJN5ZLpImBJz+tspB7pfu6ztB7xsvFuAf6zOGERuqEN\nhAtnkG/jYABESEmNeqGLGEE2YLDE2QWKFvwjuHh6o8b1ULuHZp9oPHTO5YVR\nVHfdipgPjkgzNlYTphPT0BRGcMzc7Vd0o4dLWJ4WCBDW3rO2I2FFN02ss0Lm\nvG5oznvFnM6PBoP+gzK5dv9tNJRwtOCK6KBe/IfMHlSJbE0GBc+sXG0G9AUb\nh855jbkMi6XA/Lb84sFLVMp9IHDQ07jv1OHuzO0jd1fsj18BjLaVMQ4w+I+6\nePgKzQVqC4qPqINt9f6/F5qqQ2+Tgw+PLc6corkWElsvoZ6czZ3ztSqkTjL4\nXa7hiPdvM1qOKZv8fR1hH6ZsVSd53KzlGS6QE0y0K9Lt94mf/gZDiKE+YC4a\nuzqN3DAEJfu+OJliyK6t8yAzxFjSL9iemQMWEzuBlhM/7U3JX0H4b+WvM5kI\ngUVgSURKK/KJeQsqoERvvYBep262QGLqnuCg5SGjDVXbMSlmPlU7KxFu29b1\nBxIE\r\n=wb6A\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","engines":{"node":">=10.0.0"},"gitHead":"ff1f76c693ba2d240f67fe59217fdcfd60de0a05","scripts":{"lint":"eslint . --fix","test":"npm run lint"},"_npmUser":{"name":"ryanblock","email":"rblock+npm@gmail.com"},"deprecated":"Package has been renamed & moved to @architect/macro-node-prune","repository":{"url":"git+https://github.com/architect/arc-macro-node-prune.git","type":"git"},"_npmVersion":"6.13.4","description":"Architect serverless framework macro that cleans node_modules cruft from your cloud functions during deployment","directories":{},"_nodeVersion":"10.19.0","dependencies":{"@architect/utils":"~1.4.7"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^6.8.0"},"_npmOperationalInternal":{"tmp":"tmp/arc-macro-node-prune_0.0.4_1583718657280_0.08369204588089452","host":"s3://npm-registry-packages"}},"1.0.0":{"name":"@architect/arc-macro-node-prune","version":"1.0.0","keywords":["amazon","api gateway","arc","architect","aws","ci","cloud functions","cloud","deployment","lambda","macro","node_modules","npm","plugin","serverless"],"author":{"name":"Ryan Block"},"license":"Apache-2.0","_id":"@architect/arc-macro-node-prune@1.0.0","maintainers":[{"name":"brianleroux","email":"b@brian.io"},{"name":"dam","email":"kristoferjoseph@gmail.com"},{"name":"kborchers","email":"kris.borchers@gmail.com"},{"name":"ryanblock","email":"rblock+npm@gmail.com"}],"homepage":"https://arc.codes","bugs":{"url":"https://github.com/architect/arc-macro-node-prune/issues"},"dist":{"shasum":"ec3b24002fe62d9c7b0d36558ab9b34ae4954989","tarball":"https://registry.npmjs.org/@architect/arc-macro-node-prune/-/arc-macro-node-prune-1.0.0.tgz","fileCount":6,"integrity":"sha512-2sSzmXJd8tVU9s0Z0WIUPE4/VJl8+DKlhDVTjNtDaxiDXm5ii0Nel+Q/20AXX00VCK2N/9rsQ5OBKKSXexofig==","signatures":[{"sig":"MEQCIBJlvERPD1WvFbwFACM/T9FTMfX9cxoZ//HtDxl3X538AiArTQH3Uf5NXMZ/OvI0biQUR81E63fTtePjAFrdO7eNfQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":21295,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeZaJGCRA9TVsSAnZWagAAEKIP/2qxEvJ42DfRgadkMbzc\n6r88tR1QF9hctVyo9wOL2tl9xJJaEBn7cEVYctEkQR/KlnAIOnVih7zkeg1X\nKnJS4sH2OQnmM7vq7PePS5unBigV3eftm6VQVKQuUnv/9RzeUUIGvDmp8tbf\nQvFk51DOjXFBO2koF7SUAiJIFcDQzxjxPnc9cbEspZ7hxlrFBgWnBsJUYX2U\n9ObYEfGH1OIM6woWyG62MT5Q7fNVLX0IdzkxtXRarl1LAlnVtZ40rT0KMeMw\nKQE0/UhK8v4UhvBr9xojbvC4HJJNKGzmsV3hfJlGFnrAeGjdFALOLAKq3qLU\ntG10lgHOeiDuXJXfZKngWuGGNjoG5FrDeUuwCny6Z4Ygv24q7DnoMfdeU07c\nd7BFVsWNuyrjhyqc8U8yhCXzm57WvkxbhLmFKx+69WX8Bv31DSZbGWZIeN1r\nXTD5tWLtsMtNlbvEwV8xLTf2n+iOCx+e2W2rEThkmxKQEcr+nxJyHWE03rI9\nb53QGL0e/Sl3baDQNWFdDAJyU80pe0tbyXiXRj/P5N/A91cbrcPpi/cufM2z\nL/Lzbn+tDGUJX15CiiotHKUnPdNlckalL4gbfqLoeYwm4mcKIxw5VtQN5FZw\nGsZ9X6t7qojIiXHgTWIR2rBIJzQPwkbOoOUkLsRAoxqL1P52O8rYj1HRS1Lr\nE1/X\r\n=7My0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","engines":{"node":">=10.0.0"},"gitHead":"18072098921f59916fbb9e910ef528274270d042","scripts":{"lint":"eslint . --fix","test":"npm run lint"},"_npmUser":{"name":"ryanblock","email":"rblock+npm@gmail.com"},"deprecated":"Package has been renamed & moved to @architect/macro-node-prune","repository":{"url":"git+https://github.com/architect/arc-macro-node-prune.git","type":"git"},"_npmVersion":"6.13.4","description":"Architect serverless framework macro that cleans node_modules cruft from your cloud functions during deployment","directories":{},"_nodeVersion":"10.19.0","dependencies":{"@architect/utils":"~1.4.7"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^6.8.0"},"_npmOperationalInternal":{"tmp":"tmp/arc-macro-node-prune_1.0.0_1583718982356_0.23198190638788496","host":"s3://npm-registry-packages"}}},"time":{"created":"2020-03-09T01:32:47.576Z","modified":"2026-03-03T19:04:08.273Z","0.0.2":"2020-03-09T01:32:47.885Z","0.0.3":"2020-03-09T01:40:23.367Z","0.0.4":"2020-03-09T01:50:57.394Z","1.0.0":"2020-03-09T01:56:22.513Z"},"bugs":{"url":"https://github.com/architect/arc-macro-node-prune/issues"},"author":{"name":"Ryan Block"},"license":"Apache-2.0","homepage":"https://arc.codes","keywords":["amazon","api gateway","arc","architect","aws","ci","cloud functions","cloud","deployment","lambda","macro","node_modules","npm","plugin","serverless"],"repository":{"url":"git+https://github.com/architect/arc-macro-node-prune.git","type":"git"},"description":"Architect serverless framework macro that cleans node_modules cruft from your cloud functions during deployment","maintainers":[{"email":"b@brian.io","name":"brianleroux"},{"email":"kristoferjoseph@gmail.com","name":"dam"},{"email":"kris.borchers@gmail.com","name":"kborchers"},{"email":"rblock+npm@gmail.com","name":"ryanblock"},{"email":"ryan+architectci@begin.com","name":"architectci"},{"email":"maj.fil@gmail.com","name":"filmaj"},{"email":"simon.macdonald@gmail.com","name":"macdonst"},{"email":"ryan.bethel@gmail.com","name":"ryanbethel"}],"readme":"[<img src=\"https://s3-us-west-2.amazonaws.com/arc.codes/architect-logo-500b@2x.png\" width=500>](https://www.npmjs.com/package/@architect/architect)\n\n## [`@architect/arc-macro-node-prune`](https://www.npmjs.com/package/@architect/arc-macro-node-prune)\n\n> Node.js-specific Architect macro based on [`node-prune`](https://github.com/tuananh/node-prune) that cleans `node_modules` cruft from your Functions during deployment\n\n\n## Warning\n\nPruning your `node_modules` tree(s) has some inherent risks. While we have found it to be stable and reliable, the packages your project uses may provide different results.\n\nFor example: while unlikely, a package that includes and makes use of a file with a commonly `.npmignore`d filename may be impacted by this pruner. For a list of files and folders that are pruned, please [review the pruner script source](https://github.com/architect/arc-macro-node-prune/blob/master/prune.sh).\n\n\n## Installation\n\n1. Run: `npm i @architect/arc-macro-node-prune`\n\n2. Then add the following to your Architect project file (usually `.arc`):\n\n```\n@macros\narchitect/arc-macro-node-prune\n```\n\n> Note, no `@` in the macro name!\n\n3. Deploy your project (`npx deploy`) and watch the filesizes drop 📉\n\n\n## Results\n\nIn practice, we have seen average filesize and file count reductions of about 25-30% across the board. That's a meaningful number for cloud functions!\n\n\n## Disabling the macro\n\nIf for whatever reason you need to disable the macro, simply comment it out in (or remove it from) your Architect project file:\n\n```\n@macros\n# architect/arc-macro-node-prune\n```\n\n\n## Limitations\n\n- Architect supports shared code by selectively copying `src/shared` and `src/views` into all Functions' `node_modules` dirs by default.\n  - Because this macro runs just prior to deployment, it must avoid Architect shared code dirs so as not to inadvertently destroy user files.\n  - As such, any `node_modules` folders within `src/shared` or `src/views` will not be pruned.\n- This macro relies on shelling out to a bash script, so ymmv on Windows.\n","readmeFilename":"readme.md"}