Socket
Socket
Sign inDemoInstall

mkdist

Package Overview
Dependencies
164
Maintainers
0
Versions
39
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    mkdist

Lightweight file-to-file transformer


Version published
Weekly downloads
79K
decreased by-3.16%
Maintainers
0
Created
Weekly downloads
 

Changelog

Source

v1.5.3

compare changes

🩹 Fixes

  • dts: Use ts.convertCompilerOptionsFromJson to normalise (#224)

🏡 Chore

❤️ Contributors

Readme

Source

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

FAQs

Last updated on 24 Jun 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc