Skip to content
/ mkdist Public
forked from unjs/mkdist

Lightweight file-to-file transpiler.

License

Notifications You must be signed in to change notification settings

wd-4000/mkdist

 
 

Repository files navigation

mkdist with scss compilation disabled. original description below!

mkdist

npm version npm downloads Github Actions Codecov

Lightweight file-to-file transformer

✅ Copies all assets

✅ Supports Vue Single File Components

✅ Fast and minimal transform by esbuild

.d.ts generation for .ts, .js and .vue files

✅ Support postcss (autoprefixer, cssnano and postcss-nested enabled out of the box!)

❓ Why?

Bundling libraries isn't always the best choice:

  • We lose original file structure
  • We lose modern syntax by transpiling in bundle
  • We lose critical-css by extracting css to a global dist (vue)
  • 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)

While there are tools like tsc and @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.

🚀 Usage

npx mkdist [rootDir] [--src=src] [--dist=dist] [--pattern=glob [--pattern=more-glob]] [--format=cjs|esm] [-d|--declaration] [--ext=mjs|js|ts]

License

MIT

About

Lightweight file-to-file transpiler.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 88.2%
  • JavaScript 8.9%
  • Vue 2.5%
  • Other 0.4%