create-espkg
v0.1.9
Published
A CLI tool designed to streamline the creation of Npm packages with built-in support for JavaScript/TypeScript and React/Next.js projects.
Downloads
34
Maintainers
Readme
create-espkg
create-espkg
is a CLI tool designed to streamline the creation of npm packages with built-in support for JavaScript/TypeScript and React/Next.js projects. By leveraging esbuild for fast and efficient builds, this tool helps you quickly set up a project with the necessary configuration and dependencies.
Read full documentation here.
Table of Contents:
Installation
Global Installation
To install create-espkg
globally, you need Node.js and npm installed on your system. Once you have them, run the following command:
npm install -g create-espkg
This will make the create-espkg
command available globally on your system.
Using npx
If you prefer not to install the package globally, you can run create-espkg
directly using npx
:
npx create-espkg
This command will run the latest version of create-espkg
without needing to install it globally.
Usage
Creating a Package
To create a new package, run the create-espkg
command followed by the name of the directory where you want to create the package. If you don't provide a directory name, it will prompt you for a package name and create a folder with that name.
# Create a new package in a specified directory
create-espkg your-package-name
# Or, simply run the command and it will prompt you for the package name
create-espkg
If you're using npx
, the command will look like this:
# Create a new package using npx
npx create-espkg your-package-name
# Or, run npx and follow the prompts
npx create-espkg
Template Options
After you initiate the command, you will be prompted to select a template. You can choose from the following options:
javascript (with types)
: This template sets up a basic JavaScript project with TypeScript support and includes tools like Jest for testing and esbuild for bundling.react/next (with types)
: This template sets up a React project with Next.js and TypeScript, including all necessary dependencies and dev tools.
Example
Run the command:
create-espkg
or using
npx
:npx create-espkg
Provide the requested information (package name, author name, and select a template).
The tool will create a new directory with the package name, copy the template files, and install the required dependencies.
Your new project is now ready to go!
Features
- Efficient Builds: Utilizes esbuild for fast and efficient builds.
- Easy Setup: Quickly generate a boilerplate project with a few commands.
- Multiple Templates: Choose between a JavaScript/TypeScript setup or a React/Next.js setup.
- Automated Dependency Installation: Automatically installs the latest versions of the required dependencies based on the selected template.
- Customizable: Easily modify the templates to fit your specific needs.
Contributing
Contributions are welcome! If you find a bug or have a feature request, please open an issue on the GitHub repository. You can also fork the repository, make your changes, and submit a pull request.
License
This project is licensed under the MIT License. See the LICENSE file for more details.