β― A powerful and easy-to-use CLI tool to quickly create new projects with custom templates: VanillaKit-Static and VanillaKit-Express.
Built with the following technologies:
- βοΈ Installation
- π οΈ Options
- π€ Prompts
- π Templates
- π‘ Examples
- π οΈ Development
- π§ͺ Testing
- π License
- π€ Contributing
- 𧱠About the Templates
You can quickly scaffold a project by running the following command:
npx create-vanilla-kit my-vanilla-kit
Install this tool globally to use it anywhere on your system:
npm install -g create-vanilla-kit
- -t, --template
<template>
: Choose the template you want to use. Available templates arevanillaKit-Static
(default) andvanillaKit-Express
. - -h, --help: Display help for the CLI.
When creating a project, the CLI will ask you a few simple questions:
- Template: Choose between
vanillaKit-Static
orvanillaKit-Express
. - Initialize Git: Would you like to set up a Git repository? (Yes/No)
- Install Dependencies: Do you want to install npm packages right away? (Yes/No)
A versatile static project template designed for rapid development of fast, efficient websites. It comes with a Webpack boilerplate to bundle your HTML, SCSS, and JavaScript assets seamlessly. Ideal for creating static websites with modern front-end technologies.
A robust Node.js project template featuring Express.js and WebKit support. This template is tailored for swift development of server-side applications, including built-in support for SCSS for styling and PUG for templating, making it perfect for building dynamic web applications quickly.
npx create-vanilla-kit my-static-site
npx create-vanilla-kit my-express-app --template Express
βββ create-vanilla-kit/
βββ images/ # Directory for images
βββ src/ # Source code
β βββ index.js # Main entry point for the CLI
β βββ utils/ # Utility functions
βββ templates/ # Project templates
βββ tests/ # Test cases
βββ .editorconfig # Editor configuration
βββ .eslintrc # ESLint configuration
βββ .gitignore # Git ignore file
βββ package.json # Project dependencies and scripts
βββ README.md # Project documentation
To get started, clone the repository to your local machine:
git clone https://github.com/hanzala-h/create-vanilla-kit.git
Navigate to the project directory and install the necessary dependencies:
cd create-vanilla-kit
npm install
To test or develop the CLI locally, use the following command:
node src/index.js <project-name>
Replace <project-name>
with the name of the project you wish to create. This command will run the CLI tool and create a new project with the specified name.
- Editor Configuration: Ensure that your editor is configured with the
.editorconfig
and.eslintrc
files for consistent code style and linting. - Testing: Write and run tests located in the
tests/
directory to ensure your code works as expected. - Documentation: Update the
README.md
file with relevant information about your changes and development practices.
You can write unit tests using Jest or Mocha. Be sure to add tests for critical functions such as file operations, Git initialization, and dependency installation.
This project is licensed under the MIT License. See the LICENSE file for details.
Contributions are always welcome! Whether you have new template ideas, want to fix bugs, or improve features, feel free to:
- Fork the repository
- Make your changes
- Submit a pull request
If you spot any issues or have suggestions, please open an issue, and I'll get to it as soon as I can. Even small ideas are valuable!
Both vanillaKit-Static and vanillaKit-Express are WebKit-based templates that I have personally crafted to help you start new projects faster. These templates are flexible and can be tailored to suit your needs, but theyβre built with simplicity in mind.
Check them out on GitHub: