Skip to content

zely-js/serpack

Repository files navigation

Serpack

a JavaScript/TypeScript tool for application development, powered by SWC.

Documentation NPM Version NPM Downloads

Serpack is optimized for high-speed bundling and execution of TypeScript files, leveraging swc as a transformer and oxc as a resolver for enhanced performance.

This project is designed to be a versatile tool for JavaScript and TypeScript development, providing fast compilation and module bundling capabilities. It is particularly useful for building CLI applications, server-side scripts, and other Node.js-based projects.
By default, serpack is built to run Javascript/Typescript, but it also supports module bundling!

Read our documentation

Features

  • Lightning Fast: Your JavaScript/TypeScript file will be compiled it in the blink of an eye.
  • 📦 Module Bunling: Bundle multiple files into one file.
  • 🚀 TypeScript Supported: TypeScript compilation is also possible.

CLI

$ serpack <path>

CLI documentation

APIs

compile

Compile a TypeScript or Javascript file in a executable code.

import { compile } from 'serpack';

compile('foo/bar.ts', {
  /* options */
}).then(({ code }) => {
  eval(code);
});

compile API documentation

Supported Extensions

  • JavaScript: js, cjs,mjs, jsx
  • TypeScript: ts, cts, mts, tsx
  • JSON: json

Architecture

flowchart TD
    A[TypeScript Files] --> B[SWC - Transformer]
    A --> C[OXC - Resolver]

    B --> D[Bundling]
    C --> D[Bundling]

    D --> E[Optimized Compiler]
Loading

LICENSE

MIT

About

JavaScript/TypeScript compiler

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •