{"_id":"npm-packlist-fixed","_rev":"2784979","name":"npm-packlist-fixed","description":"Get a list of the files to add from a folder into an npm package","dist-tags":{"latest":"1.1.12"},"maintainers":[{"name":"whitecolor","email":""}],"time":{"modified":"2022-06-13T08:03:25.000Z","created":"2018-12-16T15:26:35.459Z","1.1.12":"2018-12-16T15:26:35.459Z"},"users":{},"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"repository":{"type":"git","url":"git+https://github.com/npm/npm-packlist.git"},"versions":{"1.1.12":{"name":"npm-packlist-fixed","version":"1.1.12","description":"Get a list of the files to add from a folder into an npm package","directories":{"test":"test"},"main":"index.js","dependencies":{"ignore-walk":"^3.0.1","npm-bundled":"^1.0.1"},"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"license":"ISC","devDependencies":{"mkdirp":"^0.5.1","rimraf":"^2.6.1","tap":"^12.0.1"},"scripts":{"test":"tap test/*.js --100 -J","preversion":"npm test","postversion":"npm publish","postpublish":"git push origin --all; git push origin --tags"},"repository":{"type":"git","url":"git+https://github.com/npm/npm-packlist.git"},"bugs":{"url":"https://github.com/npm/npm-packlist/issues"},"homepage":"https://www.npmjs.com/package/npm-packlist","_id":"npm-packlist-fixed@1.1.12","_shasum":"0d9b0e5458d6977113432777af79df900c832d61","_from":".","_npmVersion":"4.6.1","_nodeVersion":"10.13.0","_npmUser":{"name":"whitecolor","email":"alex.oshchepkov@gmail.com"},"dist":{"shasum":"0d9b0e5458d6977113432777af79df900c832d61","size":4478,"noattachment":false,"key":"/npm-packlist-fixed/-/npm-packlist-fixed-1.1.12.tgz","tarball":"http://registry.cnpm.dingdandao.com/npm-packlist-fixed/download/npm-packlist-fixed-1.1.12.tgz"},"maintainers":[{"name":"whitecolor","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/npm-packlist-fixed_1.1.12_1544973995333_0.9399852139667524"},"_hasShrinkwrap":false,"publish_time":1544973995459,"_cnpm_publish_time":1544973995459,"_cnpmcore_publish_time":"2021-12-16T22:06:42.252Z"}},"readme":"# npm-packlist\n\n[![Build Status](https://travis-ci.com/npm/npm-packlist.svg?token=hHeDp9pQmz9kvsgRNVHy&branch=master)](https://travis-ci.com/npm/npm-packlist)\n\nGet a list of the files to add from a folder into an npm package\n\nThese can be handed to [tar](http://npm.im/tar) like so to make an npm\npackage tarball:\n\n```js\nconst packlist = require('npm-packlist')\nconst tar = require('tar')\nconst packageDir = '/path/to/package'\nconst packageTarball = '/path/to/package.tgz'\n\npacklist({ path: packageDir })\n  .then(files => tar.create({\n    prefix: 'package/',\n    cwd: packageDir,\n    file: packageTarball,\n    gzip: true\n  }, files))\n  .then(_ => {\n    // tarball has been created, continue with your day\n  })\n```\n\nThis uses the following rules:\n\n1. If a `package.json` file is found, and it has a `files` list,\n   then ignore everything that isn't in `files`.  Always include the\n   readme, license, notice, changes, changelog, and history files, if\n   they exist, and the package.json file itself.\n2. If there's no `package.json` file (or it has no `files` list), and\n   there is a `.npmignore` file, then ignore all the files in the\n   `.npmignore` file.\n3. If there's no `package.json` with a `files` list, and there's no\n   `.npmignore` file, but there is a `.gitignore` file, then ignore\n   all the files in the `.gitignore` file.\n4. Everything in the root `node_modules` is ignored, unless it's a\n   bundled dependency.  If it IS a bundled dependency, and it's a\n   symbolic link, then the target of the link is included, not the\n   symlink itself.\n4. Unless they're explicitly included (by being in a `files` list, or\n   a `!negated` rule in a relevant `.npmignore` or `.gitignore`),\n   always ignore certain common cruft files:\n\n    1. .npmignore and .gitignore files (their effect is in the package\n       already, there's no need to include them in the package)\n    2. editor junk like `.*.swp`, `._*` and `.*.orig` files\n    3. `.npmrc` files (these may contain private configs)\n    4. The `node_modules/.bin` folder\n    5. Waf and gyp cruft like `/build/config.gypi` and `.lock-wscript`\n    6. Darwin's `.DS_Store` files because wtf are those even\n    7. `npm-debug.log` files at the root of a project\n\n    You can explicitly re-include any of these with a `files` list in\n    `package.json` or a negated ignore file rule.\n\n## API\n\nSame API as [ignore-walk](http://npm.im/ignore-walk), just hard-coded\nfile list and rule sets.\n\nThe `Walker` and `WalkerSync` classes take a `bundled` argument, which\nis a list of package names to include from node_modules.  When calling\nthe top-level `packlist()` and `packlist.sync()` functions, this\nmodule calls into `npm-bundled` directly.\n","_attachments":{},"homepage":"https://www.npmjs.com/package/npm-packlist","bugs":{"url":"https://github.com/npm/npm-packlist/issues"},"license":"ISC"}