A simple Node.js project setup with TypeScript configuration.
- ✅ TypeScript support with proper configuration
- ✅ Node.js type definitions included
- ✅ Source maps and declarations generated
- ✅ Development and production scripts
- ✅ Clean project structure
├── src/ # TypeScript source files
│ └── index.ts # Main entry point
├── dist/ # Compiled JavaScript output
├── .github/ # GitHub specific files
├── package.json # Node.js dependencies and scripts
├── tsconfig.json # TypeScript configuration
└── .gitignore # Git ignore patterns
- Node.js (v18 or higher)
- npm or yarn
npm install# Run in development mode (uses ts-node)
npm run dev
# Build the project
npm run build
# Run the compiled JavaScript
npm start
# Watch mode for development
npm run watch
# Clean build artifacts
npm run cleannpm run build- Compile TypeScript to JavaScriptnpm run start- Run the compiled applicationnpm run dev- Run directly with ts-node (development)npm run watch- Compile in watch modenpm run clean- Remove build artifacts
The project uses the following TypeScript configuration:
- Target: ES2020
- Module: CommonJS
- Strict mode: Enabled
- Source maps: Enabled
- Declaration files: Generated
Compiled JavaScript files are output to the dist/ directory with:
- Source maps (
.js.map) - Type declarations (
.d.ts) - Declaration maps (
.d.ts.map)
- Use
npm run devfor rapid development with auto-recompilation - Use
npm run watchto automatically recompile on file changes - The project includes Node.js type definitions for full IDE support
- All TypeScript strict checks are enabled for better code quality
ISC