GithubHelp home page GithubHelp logo

idushii / generator-vue-components Goto Github PK

View Code? Open in Web Editor NEW
6.0 2.0 1.0 46 KB

Это простое расширение для visual code, генерирующие файл компоненты Vue2.JS

Vue 6.18% JavaScript 93.82%
vue vue2 visual-studio-code visual-code extension

generator-vue-components's Introduction

Generator-vue-components README

This extension for Visual Code It is possible with minimal actions to generate components for the Vue JS framework. It is possible to use several templates, select or enter a name and select or enter a path to create a partner. These functions can be configured in the configuration file.

Capabilities

Access to the extension functions is possible from the command palette (ctrl + shift + P).

The main function of the extension is the generation of components from templates. Templates can be general (global) or local, existing in a particular project and not available from others. Generation of templates is available under the item in the menu "generator-vue-components: new component".

In the extension, template management functions are implemented, as well as creating new ones and opening them for changes. These functions are available under the item in the menu "generator-vue-components: options" and the corresponding sub-items "Create a new template" and "Modify an existing template".

To save local settings for the project, you can use the local configuration file. This option is available from the menu item "generator-vue-components: options" and the sub-item "open the file config.json". If there is no file, it will be created.

Use

To generate a Vue component file:

  1. The "generator-vue-components: new component" command in the command palette (chift + cntrl + P).
    2.1. If a selection is selected from the list of templates, select the one you want. Otherwise, this step is automatically skipped.
    2.2. If a selection is selected from the list of component names, select the desired one. Otherwise, enter a name for the string.
    2.3. If you select from the following options for generating components, select the one you want. Otherwise, enter the path as a string.
  2. Done!

Structure of config.json settings file

{  
  "Lang": "en",                           // Possible variants of "en", "en"
  "Default": {                            // Default parameters
    "Template": "component",              // Default template when typing
    "Name": "view",                       // Name of the generated default component when typing
    "Path": "/src/components/"            // Path of the generated component by default when typed
  },
  "Lists": {                              // Parameters of the selection lists
    "Template": true,                     // Use the selection from the list of existing templates (general and local)
    // List of path selection for the generated components (for the input of the string null)
    "Path": ["/src/components/", "/src/components/home"],
	// The list of names for the generated components (for the string to be null)
    "Name": ["list", "view", "edit"]
  },
  "Templates": {                			// Internal variables
    "Global": [],
    "Local": []
  }
}

The source code is available on https://github.com/idushii/generator-vue-components

generator-vue-components's People

Contributors

dependabot[bot] avatar idushii avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

duke-lv

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.