Skip to content

hanzala-h/create-vanilla-kit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Create-Vanilla-Kit

Create-Vanilla-Kit CLI

❯ A powerful and easy-to-use CLI tool to quickly create new projects with custom templates: VanillaKit-Static and VanillaKit-Express.

npm version npm downloads MIT License

Built with the following technologies:

Node.js Express.js WebKit Mocha Chai npm


πŸ”— Table of Contents


βš™οΈ Installation

Use Directly with npx

You can quickly scaffold a project by running the following command:

npx create-vanilla-kit my-vanilla-kit

Global Installation

Install this tool globally to use it anywhere on your system:

npm install -g create-vanilla-kit

πŸ› οΈ Options

  • -t, --template <template>: Choose the template you want to use. Available templates are vanillaKit-Static (default) and vanillaKit-Express.
  • -h, --help: Display help for the CLI.

πŸ€– Prompts

When creating a project, the CLI will ask you a few simple questions:

  • Template: Choose between vanillaKit-Static or vanillaKit-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)

πŸ“‚ Templates

vanillaKit-Static

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.

vanillaKit-Express

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.


πŸ’‘ Examples

Create a VanillaKit Static Project

npx create-vanilla-kit my-static-site

Create a VanillaKit Express Project

npx create-vanilla-kit my-express-app --template Express

πŸ› οΈ Development

File Structure

└── 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

Clone the Repository

To get started, clone the repository to your local machine:

git clone https://github.com/hanzala-h/create-vanilla-kit.git

Install Dependencies

Navigate to the project directory and install the necessary dependencies:

cd create-vanilla-kit
npm install

Run Locally

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.

Additional Development Tips

  • 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.

πŸ§ͺ Testing

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.


πŸ“œ License

This project is licensed under the MIT License. See the LICENSE file for details.


🀝 Contributing

Contributions are always welcome! Whether you have new template ideas, want to fix bugs, or improve features, feel free to:

  1. Fork the repository
  2. Make your changes
  3. 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!


🧱 About the Templates

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: