{"name":"mkdist","version":"2.3.0","license":"MIT","_id":"mkdist@2.3.0","maintainers":[{"name":"pi0","email":"pyapar@gmail.com"},{"name":"danielroe","email":"daniel@roe.dev"}],"homepage":"https://github.com/unjs/mkdist#readme","bugs":{"url":"https://github.com/unjs/mkdist/issues"},"bin":{"mkdist":"dist/cli.cjs"},"dist":{"shasum":"8cd1c1319ddafd2819721a0cc1faa0a1dbdc1990","tarball":"http://registry-npm.ywwl.com/mkdist/download/mkdist-2.3.0.tgz","fileCount":15,"integrity":"sha512-thkRk+pHdudjdZT3FJpPZ2+pncI6mGlH/B+KBVddlZj4MrFGW41sRIv1wZawZUHU8v7cttGaj+5nx8P+dG664A==","signatures":[{"sig":"MEUCIEFtP+YAeObjIVW/WDZQ4u+KCU2HLnwL4XhYQHT+P+QwAiEAkYeLX86pCrZ/uHmO/ks1edqC3Ds9MQRWSv6uSXc1jno=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":67966,"size":17415,"noattachment":false,"key":"/mkdist/-/mkdist-2.3.0.tgz"},"main":"./dist/index.cjs","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"gitHead":"a7f029d9dc4ee083f7426d383f1622df4927eb09","scripts":{"dev":"pnpm mkdist test/fixture -d","lint":"eslint . && prettier --check src test","test":"pnpm lint && vitest run --coverage","build":"unbuild","mkdist":"jiti src/cli","release":"pnpm test && pnpm build && changelogen --release && npm publish && git push --follow-tags","lint:fix":"eslint --fix . && prettier --write -c src test"},"_npmUser":{"name":"danielroe","email":"daniel@roe.dev"},"repository":{"url":"git+https://github.com/unjs/mkdist.git","type":"git"},"_npmVersion":"10.9.0","description":"Lightweight file-to-file transformer","directories":{},"_nodeVersion":"22.12.0","dependencies":{"defu":"^6.1.4","jiti":"^1.21.7","mlly":"^1.7.4","citty":"^0.1.6","pathe":"^2.0.3","semver":"^7.7.1","cssnano":"^7.0.6","esbuild":"^0.25.2","postcss":"^8.5.3","pkg-types":"^2.1.0","tinyglobby":"^0.2.12","autoprefixer":"^10.4.21","postcss-nested":"^7.0.2"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.7.0","devDependencies":{"c8":"latest","vue":"^3.5.13","sass":"^1.86.0","eslint":"^9.23.0","vitest":"^3.1.1","unbuild":"^3.5.0","vue-tsc":"^2.2.8","prettier":"^3.5.3","vue-tsc1":"npm:vue-tsc@^1.8.27","typescript":"^5.8.2","vue-tsc2.0":"npm:vue-tsc@2.0.29","@types/node":"^22.13.14","changelogen":"^0.6.1","@types/semver":"^7.7.0","modern-normalize":"^3.0.1","@volar/typescript":"^2.4.12","@vue/language-core":"^2.2.8","eslint-config-unjs":"^0.4.2","@vitest/coverage-v8":"^3.1.1","vue-sfc-transformer":"^0.1.2","@vue/language-core2.0":"npm:@vue/language-core@2.0.29"},"peerDependencies":{"vue":"^3.5.13","sass":"^1.85.0","vue-tsc":"^1.8.27 || ^2.0.21","typescript":">=5.7.3","vue-sfc-transformer":"^0.1.1"},"peerDependenciesMeta":{"vue":{"optional":true},"sass":{"optional":true},"vue-tsc":{"optional":true},"typescript":{"optional":true},"vue-sfc-transformer":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/mkdist_2.3.0_1743788278409_0.8727193457488853","host":"s3://npm-registry-packages-npm-production"},"readme":"# mkdist\n\n[![npm version][npm-version-src]][npm-version-href]\n[![npm downloads][npm-downloads-src]][npm-downloads-href]\n[![Github Actions][github-actions-src]][github-actions-href]\n[![Codecov][codecov-src]][codecov-href]\n\n<!-- ![...](.github/banner.svg) -->\n\n> Lightweight file-to-file transformer\n\n✅ Copies all assets\n\n✅ Supports [Vue Single File Components](https://vuejs.org/v2/guide/single-file-components.html)\n\n✅ Fast and minimal transform by [esbuild](https://github.com/evanw/esbuild)\n\n✅ `.d.ts` generation for `.ts`, `.js` and `.vue` files\n\n✅ Support [postcss](https://postcss.org/) ([autoprefixer](https://github.com/postcss/autoprefixer), [cssnano](https://cssnano.co/) and [postcss-nested](https://www.npmjs.com/package/postcss-nested) enabled out of the box!)\n\n## ❓ Why?\n\nBundling libraries isn't always the best choice:\n\n- We lose original file structure\n- We lose modern syntax by transpiling in bundle\n- We lose critical-css by extracting css to a global dist (vue)\n- Dependencies will be always imported from bundle even if not used (a second bundling step might fix this but it usually won't happen in development and for dependencies with side-effects)\n\nWhile there are tools like [tsc](https://www.typescriptlang.org/docs/handbook/compiler-options.html) and [@babel/cli](https://babeljs.io/docs/en/babel-cli), they mostly focus on transpiling rather than keeping source level quality. Also they lack support for handling custom extensions like `.vue` and copying assets.\n\n## 🚀 Usage\n\n```bash\nnpx mkdist [rootDir] [--src=src] [--dist=dist] [--no-clean] [--pattern=glob [--pattern=more-glob]] [--format=cjs|esm] [-d|--declaration] [--ext=mjs|js|ts]\n```\n\n## License\n\n[MIT](./LICENSE)\n\n<!-- Badges -->\n\n[npm-version-src]: https://img.shields.io/npm/v/mkdist?style=flat-square\n[npm-version-href]: https://npmjs.com/package/mkdist\n[npm-downloads-src]: https://img.shields.io/npm/dm/mkdist?style=flat-square\n[npm-downloads-href]: https://npmjs.com/package/mkdist\n[github-actions-src]: https://img.shields.io/github/actions/workflow/status/unjs/mkdist/ci.yml?branch=main&style=flat-square\n[github-actions-href]: https://github.com/unjs/mkdist/actions?query=workflow%3Aci\n[codecov-src]: https://img.shields.io/codecov/c/gh/unjs/mkdist/main?style=flat-square\n[codecov-href]: https://codecov.io/gh/unjs/mkdist\n","publish_time":1743788278582,"_cnpm_publish_time":1743788278582,"dist-tags":{"latest":"2.4.1"}}