/ts-hajime

Delightfully bootstraps TypeScript npm libraries.

Primary LanguageJavaScriptMIT LicenseMIT

TS-Hajime ๐ŸŒธ

Effortlessly bootstrap strongly-typed TypeScript npm libraries with minimal configuration and a focus on developer experience.

๐ŸŒŸ Features

  • Minimal Setup & Visual Clarity: Enjoy sensible defaults that keep your project setup clean.
  • Developer-Centric: Built with tools like pkgroll, tsx, tsup, vitest, and clieye.
  • Comprehensive Configurations:
    • Preconfigured tsconfig, eslint, vitest, prettier, package.json, and .gitignore files.
    • Ready-to-use GitHub Actions, pre-commit hooks, and npm scripts.
    • Examples and tests included for both library code and npx commands.
  • TypeScript npx Commands: Write npx commands directly in TypeScript.
  • ESM & CJS Support: Outputs both ESM and CJS modules.
  • Optimized for VSCode: Pre-configured with file nesting, auto-prettify on save, and a specified TypeScript TSDK path.
  • Fully Customizable: Exposed configurations allow for complete customization to fit your needs.

๐Ÿš€ Getting Started

  1. Run the command below to bootstrap your project:

    npx ts-hajime your-app-name-here

Hereโ€™s what your project structure will look like:

Folder Structure

  1. Replace all occurrences of my-app with your appโ€™s name, and my-description with a description.

โš™๏ธ Key Commands

  • Build: npm run build
  • Test: npm test
  • Lint & Fix: npm run lint
  • Type Check: npm run tsc
    (Note: Type checking is automatically done in GitHub Actions as part of the build step with pkgroll.)
  • Try npx Command Locally: npm run npx something
    (Modify the npx script in package.json to suit your project requirements.)

Start your TypeScript library development journey with a delightful, optimized, and flexible setup. Enjoy coding! ๐ŸŒธ

๐Ÿšง Roadmap

  • replace cleye with cac