Module Package is a powerful CLI tool designed to help developers easily generate Vue.js module structures. Whether you're building a new application or maintaining an existing one, this tool will streamline the process of creating reusable and maintainable Vue modules.
- Automatically generates the folder structure for Vue.js modules.
- Supports Vue 3 and Composition API.
- Easy-to-use command line interface.
- Configurable templates for different module types.
To get started, you'll first need to install Module Package globally.
npm i vue-module-makerAfter installation, you can access the tool using the npx create-vue-module <module-name> command.
Once installed, use the npx create-vue-module <module-name> command to generate a new module.
npx create-vue-module <module-name>For example, to create a new Blog module, run:
npx create-vue-module blogThis will generate a new module named blog with the following structure:
blog/
├── components/
├── views/
├── store/
└── router/
You can customize the generated module by modifying the template files located in the templates/ folder. These templates are fully configurable to suit your project's needs.
Here’s an example of how the generated module might look like:
// blog/components/BlogPost.vue
<template>
<div class="blog-post">
<h1>{{ title }}</h1>
<p>{{ content }}</p>
</div>
</template>
<script setup>
import { ref } from 'vue'
const title = ref('My First Blog Post')
const content = ref('This is the content of the blog post.')
</script>
<style scoped>
.blog-post {
font-size: 1.5rem;
color: #333;
}
</style>We welcome contributions to improve Module Package! To contribute:
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch). - Make your changes and commit (
git commit -am 'Add new feature'). - Push your changes to your fork (
git push origin feature-branch). - Create a pull request to the main repository.
This project is licensed under the MIT License - see the LICENSE file for details.
If you have any questions or need assistance, feel free to open an issue on the repository or reach out via email.
Made with ❤️ by [Shakibul Islam]