{"_id":"galactus","_rev":"3372940","name":"galactus","description":"Prunes dependencies from your package","dist-tags":{"latest":"1.0.0"},"maintainers":[{"name":"marshallofsound","email":""}],"time":{"modified":"2024-08-26T02:57:00.000Z","created":"2018-02-27T05:17:25.188Z","1.0.0":"2022-11-04T08:39:20.547Z","0.2.1":"2018-04-08T11:47:04.470Z","0.2.0":"2018-03-24T07:07:19.879Z","0.1.0":"2018-02-27T05:17:25.188Z"},"users":{},"author":{"name":"Samuel Attard"},"repository":{"type":"git","url":"git+https://github.com/marshallOfSound/galactus.git"},"versions":{"1.0.0":{"name":"galactus","version":"1.0.0","description":"Prunes dependencies from your package","main":"lib/index.js","scripts":{"build":"tsc","prepublish":"npm run build","lint":"tslint src/**/*.ts test/**/*.ts","mocha":"nyc mocha --require ts-node/register test/*_spec.ts","test":"npm run lint && npm run mocha"},"keywords":["prune","production"],"author":{"name":"Samuel Attard"},"license":"MIT","devDependencies":{"@istanbuljs/nyc-config-typescript":"^1.0.2","@types/chai":"^4.3.3","@types/debug":"^4.1.7","@types/fs-extra":"^9.0.13","@types/mocha":"^10.0.0","@types/node":"^12.20.55","chai":"^4.3.6","mocha":"^9.1.0","nyc":"^15.1.0","tempy":"^1.0.0","ts-node":"^10.9.1","tslint":"^6.1.3","typescript":"^4.8.4"},"dependencies":{"debug":"^4.3.4","flora-colossus":"^2.0.0","fs-extra":"^10.1.0"},"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","engines":{"node":">= 12"},"types":"./lib/index.d.ts","gitHead":"1cb4439f07bf695170e603611717e058bca4c70c","_id":"galactus@1.0.0","_nodeVersion":"16.14.2","_npmVersion":"8.5.0","dist":{"shasum":"c2615182afa0c6d0859b92e56ae36d052827db7e","size":4061,"noattachment":false,"key":"/galactus/-/galactus-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/galactus/download/galactus-1.0.0.tgz"},"_npmUser":{"name":"marshallofsound","email":"samuel.r.attard@gmail.com"},"directories":{},"maintainers":[{"name":"marshallofsound","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/galactus_1.0.0_1667551160414_0.3245663952082365"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-11-04T08:51:41.041Z","publish_time":1667551160547,"_cnpm_publish_time":1667551160547},"0.2.1":{"name":"galactus","version":"0.2.1","description":"Prunes dependencies from your package","main":"lib/index.js","scripts":{"build":"tsc","prepublish":"npm run build","lint":"tslint src/**/*.ts test/**/*.ts","mocha":"nyc mocha test/*_spec.ts","test":"npm run lint && npm run mocha"},"keywords":["prune","production"],"author":{"name":"Samuel Attard"},"license":"MIT","devDependencies":{"@types/chai":"^4.0.10","@types/debug":"^0.0.30","@types/fs-extra":"^4.0.0","@types/mocha":"^2.2.45","@types/tempy":"^0.1.0","chai":"^4.1.2","mocha":"^4.1.0","nyc":"^11.4.1","tempy":"^0.2.1","ts-node":"^4.1.0","tslint":"^5.9.1","typescript":"^2.4.2"},"dependencies":{"debug":"^3.1.0","flora-colossus":"^1.0.0","fs-extra":"^4.0.0"},"nyc":{"extension":[".ts"],"instrument":true,"require":["ts-node/register"],"sourceMap":true},"gitHead":"7b017aec9ade19c622804a5fe6bfd9ba27a059ee","_id":"galactus@0.2.1","_shasum":"cbed2d20a40c1f5679a35908e2b9415733e78db9","_from":".","_npmVersion":"3.10.10","_nodeVersion":"8.9.4","_npmUser":{"name":"marshallofsound","email":"samuel.r.attard@gmail.com"},"dist":{"shasum":"cbed2d20a40c1f5679a35908e2b9415733e78db9","size":25895,"noattachment":false,"key":"/galactus/-/galactus-0.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/galactus/download/galactus-0.2.1.tgz"},"maintainers":[{"name":"marshallofsound","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/galactus_0.2.1_1523188024385_0.7064753404748438"},"_cnpmcore_publish_time":"2021-12-21T00:59:20.195Z","publish_time":1523188024470,"_cnpm_publish_time":1523188024470},"0.2.0":{"name":"galactus","version":"0.2.0","description":"Prunes dependencies from your package","main":"lib/index.js","scripts":{"build":"tsc","prepublish":"npm run build","lint":"tslint src/**/*.ts test/**/*.ts","mocha":"nyc mocha test/*_spec.ts","test":"npm run lint && npm run mocha"},"keywords":["prune","production"],"author":{"name":"Samuel Attard"},"license":"MIT","devDependencies":{"@types/chai":"^4.0.10","@types/debug":"^0.0.30","@types/fs-extra":"^4.0.0","@types/mocha":"^2.2.45","@types/tempy":"^0.1.0","chai":"^4.1.2","mocha":"^4.1.0","nyc":"^11.4.1","tempy":"^0.2.1","ts-node":"^4.1.0","tslint":"^5.9.1","typescript":"^2.4.2"},"dependencies":{"debug":"^3.1.0","flora-colossus":"^0.0.2","fs-extra":"^4.0.0"},"nyc":{"extension":[".ts"],"instrument":true,"require":["ts-node/register"],"sourceMap":true},"gitHead":"20173b108eca82ce979cd4c84b77c82fdaff9b6b","_id":"galactus@0.2.0","_shasum":"c3d63ba5502466fe40ea67cc689085b3dd24a8fc","_from":".","_npmVersion":"3.10.10","_nodeVersion":"8.9.4","_npmUser":{"name":"marshallofsound","email":"samuel.r.attard@gmail.com"},"dist":{"shasum":"c3d63ba5502466fe40ea67cc689085b3dd24a8fc","size":20644,"noattachment":false,"key":"/galactus/-/galactus-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/galactus/download/galactus-0.2.0.tgz"},"maintainers":[{"name":"marshallofsound","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/galactus_0.2.0_1521875239799_0.003883713387521359"},"_cnpmcore_publish_time":"2021-12-21T00:59:20.084Z","publish_time":1521875239879,"_cnpm_publish_time":1521875239879},"0.1.0":{"name":"galactus","version":"0.1.0","description":"Prunes dependencies from your package","main":"lib/index.js","scripts":{"build":"tsc","prepublish":"npm run build","lint":"tslint src/**/*.ts test/**/*.ts","mocha":"nyc mocha test/*_spec.ts","test":"npm run lint && npm run mocha"},"keywords":["prune","production"],"author":{"name":"Samuel Attard"},"license":"MIT","devDependencies":{"@types/chai":"^4.0.10","@types/debug":"^0.0.30","@types/fs-extra":"^4.0.0","@types/mocha":"^2.2.45","@types/tempy":"^0.1.0","chai":"^4.1.2","mocha":"^4.1.0","nyc":"^11.4.1","tempy":"^0.2.1","ts-node":"^4.1.0","tslint":"^5.9.1","typescript":"^2.4.2"},"dependencies":{"debug":"^3.1.0","flora-colossus":"^0.0.2","fs-extra":"^4.0.0"},"nyc":{"extension":[".ts"],"instrument":true,"require":["ts-node/register"],"sourceMap":true},"gitHead":"a3e7117cdf8b22fe0fbb79ccafd292fce9007d41","_id":"galactus@0.1.0","_npmVersion":"5.5.1","_nodeVersion":"8.9.1","_npmUser":{"name":"marshallofsound","email":"samuel.r.attard@gmail.com"},"dist":{"shasum":"d20b74b9233df9982f1748632c91198fc03283a0","size":20370,"noattachment":false,"key":"/galactus/-/galactus-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/galactus/download/galactus-0.1.0.tgz"},"maintainers":[{"name":"marshallofsound","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/galactus_0.1.0_1519708645126_0.7680623699482874"},"_cnpmcore_publish_time":"2021-12-21T00:59:19.045Z","publish_time":1519708645188,"_cnpm_publish_time":1519708645188}},"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","_attachments":{},"homepage":"https://github.com/marshallOfSound/galactus#readme","bugs":{"url":"https://github.com/marshallOfSound/galactus/issues"},"license":"MIT"}