{"name":"galactus","version":"2.0.2","type":"module","exports":"./dist/index.js","typings":"./dist/index.d.ts","description":"Prunes dependencies from your package","engines":{"node":">=22.12.0"},"scripts":{"build":"tsc","prepublish":"npm run build","lint":"prettier --check \"src/**/*.ts\" \"test/**/*.ts\"","lint:fix":"prettier --write \"src/**/*.ts\" \"test/**/*.ts\"","test":"npm run lint && vitest run","test:watch":"vitest","test:coverage":"vitest run --coverage","prepare":"husky"},"keywords":["prune","production"],"author":{"name":"Samuel Attard"},"license":"MIT","dependencies":{"debug":"^4.4.1","flora-colossus":"^3.0.2"},"devDependencies":{"@tsconfig/node22":"^22.0.2","@types/debug":"^4.1.12","@types/node":"^22.0.13","@vitest/coverage-v8":"^3.2.4","husky":"^9.1.7","lint-staged":"^16.1.2","prettier":"^3.6.2","typescript":"^5.8.3","vitest":"^3.2.4"},"repository":{"type":"git","url":"git+https://github.com/MarshallOfSound/galactus.git"},"bugs":{"url":"https://github.com/MarshallOfSound/galactus/issues"},"homepage":"https://github.com/MarshallOfSound/galactus#readme","lint-staged":{"*.ts":["prettier --write"]},"_id":"galactus@2.0.2","gitHead":"59c122dea088e7363fe30064b0637b4084fd5d75","_nodeVersion":"24.3.0","_npmVersion":"11.4.2","dist":{"integrity":"sha512-HmKyTFGomdAchz4umx8MwBnrnfFmdpwiTyGA4ZOF7rya2Lmgbc9qate4yweInL+0gUBVImhaz12SBGpW3SY4Yg==","shasum":"04a4e403e28bdae7622ed7b46519953bb0717098","tarball":"http://registry-npm.ywwl.com/galactus/download/galactus-2.0.2.tgz","fileCount":9,"unpackedSize":10216,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIC2ZBVNh/Y2Oi64kJhqpho/GWKEAPAzHWkldi8D8i06lAiEAiq6olXwUA/BUQtcaU7JIgW48oxUxXYYY7HPikunOI5U="}],"size":3806,"noattachment":false,"key":"/galactus/-/galactus-2.0.2.tgz"},"_npmUser":{"name":"marshallofsound","email":"samuel.r.attard@gmail.com"},"directories":{},"maintainers":[{"name":"marshallofsound","email":"samuel.r.attard@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/galactus_2.0.2_1752470079706_0.12302439871437532"},"_hasShrinkwrap":false,"readme":"Galactus\n-----------\n\n> A JS implementation of `prune --production`\n\n## Installation\n\n```bash\nnpm i --save-dev galactus\n```\n\n## API\n\n### Class: `DestroyerOfModules`\n\n```js\nimport { DestroyerOfModules } from 'galactus';\n\n// modulePath is the root folder of your module\nconst destroyer = new DestroyerOfModules({\n  rootDirectory: __dirname,\n  // Optionally provide your own walker from 'flora-colossus'\n  walker: myWalker,\n  // Optionally provide a method to override the default\n  // keep or destroy test\n  shouldKeepModuleTest: (module, isDepDep) => true,\n});\n```\n\n#### `destroyer.destroy()`\n\nReturns a `Promise` that resolves once the destruction is complete. By default\nit will destroy all dependencies that aren't required for production or\noptional dependencies. You can override this behavior by providing a\n`shouldKeepModuleTest` function in the constructor.\n\n#### `destroyer.collectKeptModules()`\n\nReturns a `Promise` of a `ModuleMap` (a `Map` of paths to `Module`s). The\n`Promise` resolves when the walker finishes walking the module tree. The\n`ModuleMap` only contains the `Module`s that would be kept by a call\nto `destroy()`.\n\nThere is one optional keyword argument, `relativePaths`. By default, the paths\nin the `ModuleMap` are absolute. If `relativePaths` is `true`, they are relative\nto the `rootDirectory` specified in the constructor.\n","publish_time":1752470079899,"_cnpm_publish_time":1752470079899,"dist-tags":{"latest":"2.0.2"}}