{"name":"mkdist","version":"2.2.0","description":"Lightweight file-to-file transformer","repository":{"type":"git","url":"git+https://github.com/unjs/mkdist.git"},"license":"MIT","exports":{".":{"require":"./dist/index.cjs","import":"./dist/index.mjs","types":"./dist/index.d.ts"}},"main":"./dist/index.cjs","types":"./dist/index.d.ts","bin":{"mkdist":"dist/cli.cjs"},"scripts":{"build":"unbuild","dev":"pnpm mkdist test/fixture -d","lint":"eslint . && prettier --check src test","lint:fix":"eslint --fix . && prettier --write -c src test","mkdist":"jiti src/cli","release":"pnpm test && pnpm build && changelogen --release && npm publish && git push --follow-tags","test":"pnpm lint && vitest run --coverage"},"dependencies":{"autoprefixer":"^10.4.20","citty":"^0.1.6","cssnano":"^7.0.6","defu":"^6.1.4","esbuild":"^0.24.2","jiti":"^1.21.7","mlly":"^1.7.3","pathe":"^1.1.2","pkg-types":"^1.2.1","postcss":"^8.4.49","postcss-nested":"^7.0.2","semver":"^7.6.3","tinyglobby":"^0.2.10"},"devDependencies":{"@types/node":"^22.10.2","@types/semver":"^7.5.8","@vitest/coverage-v8":"^2.1.8","@volar/typescript":"^2.4.11","@vue/language-core":"^2.2.0","@vue/language-core2.0":"npm:@vue/language-core@2.0.29","c8":"latest","changelogen":"^0.5.7","eslint":"^9.17.0","eslint-config-unjs":"^0.4.2","modern-normalize":"^3.0.1","prettier":"^3.4.2","sass":"^1.83.0","typescript":"^5.7.2","unbuild":"^3.0.1","vitest":"^2.1.8","vue":"^3.5.13","vue-tsc":"^2.2.0","vue-tsc1":"npm:vue-tsc@^1.8.27","vue-tsc2.0":"npm:vue-tsc@2.0.29"},"peerDependencies":{"sass":"^1.83.0","typescript":">=5.7.2","vue":"^3.5.13","vue-tsc":"^1.8.27 || ^2.0.21"},"peerDependenciesMeta":{"sass":{"optional":true},"typescript":{"optional":true},"vue":{"optional":true},"vue-tsc":{"optional":true}},"packageManager":"pnpm@9.15.1","_id":"mkdist@2.2.0","gitHead":"818b664d6fca8a2252f38442a87acac018a8d781","bugs":{"url":"https://github.com/unjs/mkdist/issues"},"homepage":"https://github.com/unjs/mkdist#readme","_nodeVersion":"22.12.0","_npmVersion":"10.9.0","dist":{"integrity":"sha512-GfKwu4A2grXfhj2TZm4ydfzP515NaALqKaPq4WqaZ6NhEnD47BiIQPySoCTTvVqHxYcuqVkNdCXjYf9Bz1Y04Q==","shasum":"66cd712075a965a60b3fd51b209545d6c6a8b2fa","tarball":"http://registry-npm.ywwl.com/mkdist/download/mkdist-2.2.0.tgz","fileCount":15,"unpackedSize":65898,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDp4RBB3yebPtgvJfrAOrTPctRpeDsXCCIVLvjDoQrFAwIgceN0widd3OlXpKfMT1oHBPy1IlYdGfWy7sapIVeD7ak="}],"size":16971,"noattachment":false,"key":"/mkdist/-/mkdist-2.2.0.tgz"},"_npmUser":{"name":"pi0","email":"pyapar@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mkdist_2.2.0_1735400544620_0.42707740484731294"},"_hasShrinkwrap":false,"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":1735400544833,"maintainers":[{"name":"pi0","email":"pyapar@gmail.com"},{"name":"danielroe","email":"daniel@roe.dev"}],"_cnpm_publish_time":1735400544833,"dist-tags":{"latest":"2.4.1"}}