{"_id":"@aa900031/mkdist","name":"@aa900031/mkdist","dist-tags":{"latest":"1.5.0"},"versions":{"1.5.0":{"name":"@aa900031/mkdist","version":"1.5.0","description":"Lightweight file-to-file transformer","repository":{"type":"git","url":"git+https://github.com/aa900031/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"},"dependencies":{"autoprefixer":"^10.4.17","citty":"^0.1.5","cssnano":"^6.0.3","defu":"^6.1.4","esbuild":"^0.19.11","fs-extra":"^11.2.0","globby":"^13.2.2","jiti":"^1.21.0","mlly":"^1.5.0","mri":"^1.2.0","pathe":"^1.1.2","postcss":"^8.4.33","postcss-nested":"^6.0.1"},"devDependencies":{"@types/fs-extra":"^11.0.4","@types/mri":"^1.1.5","@types/node":"^20.11.5","@vitest/coverage-v8":"^0.34.6","c8":"latest","changelogen":"^0.5.5","eslint":"^8.56.0","eslint-config-unjs":"^0.2.1","modern-normalize":"^2.0.0","prettier":"^3.2.4","sass":"^1.69.7","typescript":"^5.3.3","unbuild":"^2.0.0","vitest":"^0.34.6","vue":"^3.3.4","vue-tsc":"^1.8.5"},"peerDependencies":{"sass":"^1.69.7","typescript":">=5.3.3","vue-tsc":"^1.8.5"},"peerDependenciesMeta":{"sass":{"optional":true},"typescript":{"optional":true},"vue-tsc":{"optional":true}},"packageManager":"pnpm@8.14.1","scripts":{"build":"unbuild","dev":"pnpm mkdist test/fixture -d","lint":"eslint --ext .ts,.mjs,.cjs . && prettier --check src test","lint:fix":"eslint --fix --ext .ts,.mjs,.cjs . && 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"},"bugs":{"url":"https://github.com/aa900031/mkdist/issues"},"homepage":"https://github.com/aa900031/mkdist#readme","_id":"@aa900031/mkdist@1.5.0","_integrity":"sha512-3jl58UXHUnXByw3xcWwAAmLuSwmqD7pn5Z6aTdPWD0yex8kR+G162V4A2WbXTturtIGGUXM063aymudgIj0Mag==","_resolved":"/private/var/folders/13/4qd1jr9d635b_4xwmfj4jqrw0000gn/T/befac5392bbf5997efd67bd7927c0aff/aa900031-mkdist-1.5.0.tgz","_from":"file:aa900031-mkdist-1.5.0.tgz","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-3jl58UXHUnXByw3xcWwAAmLuSwmqD7pn5Z6aTdPWD0yex8kR+G162V4A2WbXTturtIGGUXM063aymudgIj0Mag==","shasum":"324fed4c65cefb09fb346cea46eb56212ae1d027","tarball":"https://registry.npmjs.org/@aa900031/mkdist/-/mkdist-1.5.0.tgz","fileCount":13,"unpackedSize":46010,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDfempGwYSEx4QU5QCZgDJJ+L4NbShKq3187EU9N+tkUwIhAIKPVyPwRake9gBpkxqeZ0H4J3Em+Q72xqh88g+9aqBm"}]},"_npmUser":{"name":"aa900031","email":"aa900031@gmail.com"},"directories":{},"maintainers":[{"name":"aa900031","email":"aa900031@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mkdist_1.5.0_1705851581104_0.2180214731851018"},"_hasShrinkwrap":false}},"time":{"created":"2024-01-21T15:39:40.995Z","1.5.0":"2024-01-21T15:39:41.254Z","modified":"2024-01-21T15:39:41.512Z"},"maintainers":[{"name":"aa900031","email":"aa900031@gmail.com"}],"description":"Lightweight file-to-file transformer","homepage":"https://github.com/aa900031/mkdist#readme","repository":{"type":"git","url":"git+https://github.com/aa900031/mkdist.git"},"bugs":{"url":"https://github.com/aa900031/mkdist/issues"},"license":"MIT","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] [--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","readmeFilename":"README.md"}