JSPM

ts-package-init

0.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 5
  • Score
    100M100P100Q20030F
  • License MIT

Fast, minimal, and modern TypeScript project initializer

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ts-package-init) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    ts-package-init

    A fast, minimal, and modern TypeScript project initializer.

    Create a TypeScript project with sensible defaults in seconds — no frameworks, no boilerplate overload.


    ✨ Features

    • Zero-config TypeScript setup
    • Presets: base, library, backend, cli
    • CommonJS or ESM (--esm)
    • Optional ESLint & Prettier
    • Uses tsx for fast dev experience
    • Works with Node.js 18+

    🚀 Usage

    Quick start

    npx ts-package-init my-app
    cd my-app
    npm run dev

    Using npm init

    npm init ts-package my-app

    📦 Presets

    Base (default)

    Minimal runnable TypeScript project.

    npx ts-package-init my-app

    Scripts:

    {
      "build": "tsc",
      "dev": "tsx watch src/index.ts"
    }

    Library

    For reusable npm packages.

    npx ts-package-init my-lib --preset library

    Includes:

    • type declarations
    • clean build output

    Backend

    For APIs, workers, and services.

    npx ts-package-init api --preset backend

    Includes:

    • dev, build, start scripts
    • long-running process defaults

    CLI

    For command-line tools.

    npx ts-package-init my-cli --preset cli

    Includes:

    • executable binary
    • Node shebang support

    📘 ESM Support

    Enable ESM with:

    npx ts-package-init my-app --esm

    This will:

    • set "type": "module"
    • adjust TypeScript config automatically

    🧹 ESLint & Prettier (optional)

    npx ts-package-init my-app --eslint
    npx ts-package-init my-app --prettier

    Prettier automatically enables ESLint integration.


    🧪 Examples

    npx ts-package-init demo
    npx ts-package-init my-lib --preset library --esm
    npx ts-package-init api --preset backend --eslint --prettier
    npx ts-package-init tool --preset cli

    🛣 Roadmap

    • Preset-aware ESLint rules
    • Interactive mode
    • Monorepo preset
    • Framework presets (NestJS, Moleculer)

    📄 License

    MIT