{"_id":"metalsmith-only-build","_rev":"768-0308f156df18cb77ab82f6e30e8d95fa","name":"metalsmith-only-build","dist-tags":{"latest":"0.0.2"},"versions":{"0.0.1":{"name":"metalsmith-only-build","version":"0.0.1","_id":"metalsmith-only-build@0.0.1","maintainers":[{"name":"dominicbarnes","email":"dominic@dbarnes.info"}],"dist":{"shasum":"eaa9f41bebb3dd0e3432f7efdb0cd20565e6153e","tarball":"https://registry.npmjs.org/metalsmith-only-build/-/metalsmith-only-build-0.0.1.tgz","integrity":"sha512-loNWTOoBe9NrGYt+wuZskM39/UtKXO3pFnqTc/URwx5lfnfelNf0Ph7bHiFbPNreVdy0lp9677vA8Q4lixtmzg==","signatures":[{"sig":"MEUCIEs+0lXyj6JlREvhdQcZBovzTEL9NA1G7dit5PeHrAZ2AiEApS9hakShKUJj6WqtqxJsQbvQMW4glGKtTNzPs9k89vc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/index.js","_from":".","_shasum":"eaa9f41bebb3dd0e3432f7efdb0cd20565e6153e","gitHead":"e80c19213954e241b97a2fde53d2fd10f21a6f99","scripts":{},"_npmUser":{"name":"dominicbarnes","email":"dominic@dbarnes.info"},"_npmVersion":"2.1.18","description":"> Build only a specific set of files from metalsmith.","directories":{},"_nodeVersion":"1.0.2","dependencies":{"debug":"^2.1.1","minimatch":"^2.0.1"},"devDependencies":{"glob":"^4.3.5","mocha":"^2.1.0","rimraf":"^2.2.8","metalsmith":"^1.1.1","assert-dir-equal":"^1.0.1"}},"0.0.2":{"name":"metalsmith-only-build","version":"0.0.2","_id":"metalsmith-only-build@0.0.2","maintainers":[{"name":"dominicbarnes","email":"dominic@dbarnes.info"},{"name":"segment","email":"tj@segment.io"}],"homepage":"https://github.com/segmentio/metalsmith-only-build","bugs":{"url":"https://github.com/segmentio/metalsmith-only-build/issues"},"dist":{"shasum":"dce18e7a3d32077299302855fec5e6add9e7e43a","tarball":"https://registry.npmjs.org/metalsmith-only-build/-/metalsmith-only-build-0.0.2.tgz","integrity":"sha512-DpSZmrt3M1O4kN2SaPQiE1v6A4p947jrkr1RC7FBVCUDAIVYTf3eJamQjaXhtQRMdpRLjogHDuaJGpOxtYP5ew==","signatures":[{"sig":"MEUCIDBNU8QjJrVc4RRe7TCpkRRB+6s3MZpuq+xfdtGcbhJuAiEA6MCSfYi8EFq/pVqGwwhe/LYGGk8aHTA8cMxWK5Yy/X4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/index.js","_from":".","_shasum":"dce18e7a3d32077299302855fec5e6add9e7e43a","_npmUser":{"name":"segment","email":"tj@segment.io"},"repository":{"url":"git://github.com/segmentio/metalsmith-only-build","type":"git"},"_npmVersion":"1.4.9","description":"Only build a certain subset of an entire metalsmith site.","directories":{},"dependencies":{"debug":"^2.1.1","minimatch":"^2.0.1"},"devDependencies":{"glob":"^4.3.5","mocha":"^2.1.0","rimraf":"^2.2.8","metalsmith":"^1.1.1","assert-dir-equal":"^1.0.1"}}},"time":{"created":"2015-02-07T00:22:04.004Z","modified":"2026-06-11T22:37:55.577Z","0.0.1":"2015-02-07T00:22:04.004Z","0.0.2":"2015-04-08T23:40:08.041Z"},"bugs":{"url":"https://github.com/segmentio/metalsmith-only-build/issues"},"homepage":"https://github.com/segmentio/metalsmith-only-build","repository":{"url":"git://github.com/segmentio/metalsmith-only-build","type":"git"},"description":"Only build a certain subset of an entire metalsmith site.","maintainers":[{"email":"secure-supply-chain@twilio.com","name":"twilio-supply-chain"},{"email":"tools@segment.com","name":"segmentio"},{"email":"tools+npm@segment.com","name":"segment-admin"}],"readme":"# metalsmith-only-build\n\n> Build only a specific set of files from metalsmith.\n\nThe default behavior of metalsmith is to _always_ rebuild **everything**.\nThe main purpose of this plugin is to try and streamline builds as much as\npossible during development. (particularly for `make` users)\n\nBefore metalsmith starts writing files, this plugin will delete every\nreference from the `files` hash that is not specified to be built. This\ncauses Metalsmith to skip these files during the last phase of the build.\n(this plugin should be **last** in order to prevent unwanted side-effects)\n\nMost plugins assume that all files in the build will be available in memory,\nso we _cannot_ safely reject files from the build at the outset. However, by\nskipping the I/O required to write those files at the end, we can save some\nbuild time, while also allowing `make` to be used properly.\n\nThis plugin goes to great lengths to _not_ change the default behavior of\nMetalsmith unless it is very clear that is the intent of the dev.\n\n * `Metalsmith.clean` must be set to `false`\n * a `METALSMITH_ONLY` env var must be set (as a space-separated list of\n   files to _only_ include)\n\n## Configuration\n\n```js\nvar only = require('metalsmith-only-build');\n\n// make sure this plugin is **last**\nmetalsmith.use(only())\n```\n\n```json\n{\n  \"plugins\": {\n    // make sure this plugin is **last**\n    \"metalsmith-only-build\": true\n  }\n}\n```\n\n## Usage\n\n```make\nbuild/%.html: articles/%.html\n  METALSMITH_ONLY=\"%<\" metalsmith\n```\n","readmeFilename":"Readme.md"}