@marcuth/create-package
v0.3.0
Published
Create a new package
Readme
@marcuth/create-package
A personalized CLI tool to quickly bootstrap a new TypeScript package with a predefined set of best practices and tools.
✨ Features
- TypeScript Ready: Pre-configured
tsconfig.jsonfor modern Node.js development. - ESLint & Prettier: Full linting setup including
eslint-plugin-unused-importsand automatic code formatting. - Git Integration: Automatically initializes a git repository, prompts for a remote origin, and sets up
.gitignoreand.gitattributes. - Package Metadata: Infers
homepageandbugsURLs from your repository link (GitHub/GitLab). - Package Manager Detection: Intelligently detects whether you are using
npm,pnpm, oryarn.
🚀 Usage
You can run it directly npm:
npm create @marcuth/package@latest my-package # or npm init @marcuth/package@latest my-packageOr for scoped packages:
npm create @marcuth/package@latest @scope/my-package # or npm init @marcuth/package@latest @scope/my-package🛠️ What's Inside the Generated Project?
- Standard Directory Structure:
src/directory for your TypeScript source code. - Pre-configured Scripts:
npm run build: Compiles TypeScript todist/.npm run dev: Runs the project usingts-node.npm run format: Formats code using Prettier.npm run lint: Checks for linting errors and removes unused imports.
- Standard Files:
.gitignore,.gitattributes,LICENSE(MIT),README.md, and.npmignore.
📦 Requirements
- Node.js installed.
- Git (optional, but recommended for repository initialization).
📄 License
MIT © Marcuth
