VGENT – Vue Agent, that helps you to develop in a more effective way

Overview

VGENT


VGENT – Vue Agent, that helps you to develop in a more effective way.

VGENT is a CLI tool that generates boilerplate files for components, pages. You can easily customize the generator for your project and save it in the configuration file:

  • provide directories, where to generate your components
  • choose the language of the component: JavaScript or TypeScript
  • choose which component API to use such as Options API, Composition API, or Class components
  • choose CSS preprocessor
  • choose the component saving option: .vue or /index.vue
  • enable Atomic Design methodology structure of the components directory

Installing

npm install --global vgent

# or

yarn global add vgent

If you want to use VGENT locally in your project, you can install it:

npm install --save-dev vgent

# or

yarn add --dev vgent

However, to use VGENT locally, you need always execute commands through npx or yarn

npx vgent init

# or

yarn vgent init

How to use

Note: if your project doesn’t have Nuxt.js or Vue.js you can’t use this tool.

First of all, you need to initialize VGENT and configure it in your project running the next command:

vgent init

Then, you need to provide some information about your project structure, finally, VGENT will create a configuration file: .vgentrc

{
  "src": "/",
  "dir": {
    "components": "/components",
    "pages": "/pages"
  },
  "components": {
    "atomicDesign": true,
    "styleLang": "scss",
    "scriptLang": "ts",
    "componentApi": "optionsApi",
    "useIndex": true
  },
  "pages": {
    "useIndex": true
  }
}

Configuration glossary

  • src – is a source directory of your project.
  • dir – is an object where:
    • components – is a directory of the components
    • pages – is a directory of the pages or views
  • components – is an object of the component generation configurations where:
    • atomicDesign – is a flag to define Atomic Design structure
    • styleLang – is a name of your CSS preprocessor or just CSS
    • scriptLang – is the name of programming language to use in the components
    • componentsApi – is a script block type of your component. It could be optionsApi, compositionApi or class. Class type is available if you are using TypeScript.
    • useIndex – is a flag to provide format of component saving: /index.vue or .vue .
  • pages – is an object of the pages generation configuration where:
    • useIndex – is a flag to provide format of component saving: /index.vue or .vue .

Component generation

To generate a component you need to run the next command:

vgent make -c <component_name>

This command will generate the component in the components directory provided in the configuration with other options

If you are using the Atomic Design directory structure you can provide the component type:

# to generate an atom component
vgent make -c <component_name> -a

# to generate a molecule component
vgent make -c <component_name> -m

# to generate an organism component
vgent make -c <component_name> -o

# to generate a template component
vgent make -c <component_name> -t

Page component generation

To generate a page component you need to run the next command:

vgent make -p <page_name>

This command will generate the page component in the pages directory provided in the configuration with other component options

If you need to generate a dynamic page (slug or id) you can provide the page type:

# to generate a slug page
vgent make -p <page_name> --slug

# to generate an id page
vgent make -p <page_name> --id

Authors

Arman Kuanysh – @armankuanysh

License

This project is licensed under the MIT License - see the LICENSE.md  file for details

You might also like...

@auth0/auth0-spa-js wrapper in the "Vue way", with full TS support

vue-auth0 This is a wrapper around @auth0/auth0-spa-js meant to ease the usage into Vue projects. This is heavily inspired by the snippet into Auth0 o

Oct 18, 2022

Carpatin is a React JS Admin Dashboard Template that focuses on the management flows of a back-office application. We leverage the Material-UI power of stylizing the components in a way that feels more professional.

Carpatin is a React JS Admin Dashboard Template that focuses on the management flows of a back-office application. We leverage the Material-UI power of stylizing the components in a way that feels more professional.

Carpatin Dashboard Free Carpatin is a React Js Admin Dashboard Template that focuses on the management flows of a back-office application. We leverage

Dec 12, 2022

NativeScript empowers you to access native api's from JavaScript directly. Angular, Vue, Svelte, React and you name it compatible.

NativeScript empowers you to access native api's from JavaScript directly. Angular, Vue, Svelte, React and you name it compatible.

NativeScript empowers you to access native APIs from JavaScript directly. The framework currently provides iOS and Android runtimes for rich mobile de

Jan 4, 2023

OSI helps you to track your all open-source Internships and Program in a single place ⚡

OSI helps you to track your all open-source  Internships and Program in a single place ⚡

Open Source Internships Overview 👀 Dark Theme Light Theme Run locally 🛠 Fork this repo. open-source-internships 🚀 Clone the repo. ⏬ git clone https

Jan 2, 2023

Everything you wish the HTML select element could do, wrapped up into a lightweight, extensible Vue component.

vue-select Everything you wish the HTML select element could do, wrapped up into a lightweight, zero dependency, extensible Vue component. Vue Selec

Jan 2, 2023

A Vue.js 2.0 UI Toolkit for Web

A Vue.js 2.0 UI Toolkit for Web

A Vue.js 2.0 UI Toolkit for Web. Element will stay with Vue 2.x For Vue 3.0, we recommend using Element Plus from the same team Links Homepage and doc

Jan 3, 2023

The Intuitive Vue Framework

The Intuitive Vue Framework

Build your next Vue.js application with confidence using Nuxt: a framework making web development simple and powerful. Links 📘 Documentation: https:/

Jan 5, 2023

🐉 Material Component Framework for Vue

🐉 Material Component Framework for Vue

Supporting Vuetify Vuetify is a MIT licensed project that is developed and maintained full-time by John Leider and Heather Leider; with support from t

Jan 3, 2023

🛠️ Standard Tooling for Vue.js Development

Vue CLI Vue CLI is the Standard Tooling for Vue.js Development. Documentation Docs are available at https://cli.vuejs.org/ - we are still working on r

Jan 4, 2023
Comments
  • feat(core): add component name processing

    feat(core): add component name processing

    The name of the component that going to be generated has to get a proper name. The core class should have a method to validate and normalize component name

    enhancement 
    opened by armankuanysh 0
  • feat: create vue component boilerplate

    feat: create vue component boilerplate

    Create a vue component boilerplate that contains the next properties:

    • script language ts or js
    • styles language: css or preprocessor languages
    • class component, if the component is ts
    enhancement 
    opened by armankuanysh 0
  • Feature request - Add composables directory

    Feature request - Add composables directory

    Something I found missing was boilerplate for composables. As I have adopted the composables api, I'm refactoring out features and reactive code to be reused.

    My Feature request is add an option to generate this boilerplate. For the cli switch because composables are often named useX, -u makes sense to me.

    vgent make -u <composable_name>

    The default directory for composables is src/composables.

    Here is an example template for a composable named useFeature.ts

    export interface UseFeatureOptions {}
    
    /**
     * useFeature
     */
    export function useFeature(options: UseFeatureOptions = {}) {
      const {
        // add default for each option
      } = options
    
      return {}
    }
    
    export type UseFeatureReturn = ReturnType<typeof useFeature>
    

    Anywhere that useFeature is should be replaced with <composable_name>.

    For TypeScript that's the minimum common boilerplate.

    feat 
    opened by nmarshall23 1
Releases(v1.0.2)
Owner
Arman Kuanysh
JS developer
Arman Kuanysh
📓 The UI component explorer. Develop, document, & test React, Vue, Angular, Web Components, Ember, Svelte & more!

Build bulletproof UI components faster Storybook is a development environment for UI components. It allows you to browse a component library, view the

Storybook 75.9k Jan 9, 2023
Mosha-vue-toastify - A light weight and fun Vue 3 toast or notification or snack bar or however you wanna call it library.

Mosha Vue Toastify A lightweight and fun Vue 3 toast or notification or snack bar or however you wanna call it library. English | 简体中文 Talk is cheap,

Baidi Liu 187 Jan 2, 2023
A plugin that can help you create project friendly with Vue for @vue/cli 4.5

vue-cli-plugin-patch A plugin that can help you create project friendly with Vue for @vue/cli 4.5. Install First you need to install @vue/cli globally

null 2 Jan 6, 2022
:tada: A magical vue admin https://panjiachen.github.io/vue-element-admin

English | 简体中文 | 日本語 | Spanish SPONSORED BY 活动服务销售平台 客户消息直达工作群 Introduction vue-element-admin is a production-ready front-end solution for admin inter

花裤衩 80.1k Dec 31, 2022
:eyes: Vue in React, React in Vue. Seamless integration of the two. :dancers:

vuera NOTE: This project is looking for a maintainer! Use Vue components in your React app: import React from 'react' import MyVueComponent from './My

Aleksandr Komarov 4k Dec 30, 2022
🎉 基于 vite 2.0 + vue 3.0 + vue-router 4.0 + vuex 4.0 + element-plus 的后台管理系统vue3-element-admin

vue3-element-admin ?? 基于 Vite 2.0 + Vue3.0 + Vue-Router 4.0 + Vuex 4.0 + element-plus 的后台管理系统 简介 vue3-element-admin 是一个后台前端解决方案,它基于 vue3 和 element-plu

雪月欧巴 84 Nov 28, 2022
Jenesius vue modal is simple library for Vue 3 only

Jenesius Vue Modal Jenesius vue modal is simple library for Vue 3 only . Site Documentation Installation npm i jenesius-vue-modal For add modals in yo

Архипцев Евгений 63 Dec 30, 2022
A template repository / quick start to build Azure Static Web Apps with a Node.js function. It uses Vue.js v3, Vue Router, Vuex, and Vite.js.

Azure Static Web App Template with Node.js API This is a template repository for creating Azure Static Web Apps that comes pre-configured with: Vue.js

Marc Duiker 6 Jun 25, 2022
Veloce: Starter template that uses Vue 3, Vite, TypeScript, SSR, Pinia, Vue Router, Express and Docker

Veloce Lightning-fast cold server start Instant hot module replacement (HMR) and dev SSR True on-demand compilation Tech Stack Vue 3: UI Rendering lib

Alan Morel 10 Oct 7, 2022
⚡️ The easiest way to build forms with Vue.

Documentation Website What is Vue Formulate? Vue Formulate is the easiest way to build forms with Vue. Please read the comprehensive documentation for

Braid 2.2k Dec 30, 2022