@infodb/create-myts
v0.3.0
Published
Scaffolding tool for TypeScript projects
Maintainers
Readme
create-myts
Scaffolding tool for TypeScript projects - quickly create new TypeScript projects with pre-configured templates.
Usage
With npm:
npm create @infodb/mytsWith npx:
npx @infodb/create-mytsThen follow the prompts:
- Enter your project name
- Select a template (basic, cli, server, or library)
- Choose whether to automatically install dependencies
Available Templates
basic
Minimal TypeScript setup with tsc compiler.
Use case: Simple TypeScript projects, learning, quick prototypes
Includes:
- TypeScript configuration
- Basic build scripts
- tsx for development
cli
CLI application template with bin configuration.
Use case: Command-line tools and utilities
Includes:
- Executable bin file
- CLI argument parsing example
- Ready to publish as npm package with CLI command
server
HTTP server template using Node.js built-in http module.
Use case: Simple web servers, REST APIs, microservices
Includes:
- Basic HTTP server
- Example routes
- JSON response handling
library
TypeScript library template optimized for publishing.
Use case: Reusable libraries, npm packages
Includes:
- Declaration file generation
- Source maps
- Proper module exports configuration
Project Structure
After creating a project, you'll get:
my-project/
├── src/
│ └── index.ts (or server.ts for server template)
├── package.json
├── tsconfig.json
└── .gitignoreCommands in Generated Projects
All templates include these scripts:
npm run dev- Run TypeScript directly with tsxnpm run build- Compile TypeScript to JavaScriptnpm start- Run compiled JavaScript
Requirements
- Node.js 18.0.0 or higher
- npm 7.0.0 or higher
Development
To work on this package:
# Clone the repository
git clone <repo-url>
cd create-myts
# Install dependencies
npm install
# Build the CLI
npm run build
# Test locally
node bin/cli.jsLicense
MIT
