Generate Component Folders and Files, Reactjs, VueJS ...etc

Generate Component Folders and Files, Reactjs, VueJS ...etc

Components boilerplate is an extension that help you organize your components and be more productive,its work by allowing users to spawn/generate predefined component with specific name using a specific folders hierarchy and files defined by the boilerplate,

Components boilerplate

Components boilerplate is an extension that help you organize your components and be more productive,its work by allowing users to spawn/generate predefined component with specific name using a specific folders hierarchy and files defined by the boilerplate,

the generated component files will be filled using the specified name by a boilerplate code.

How to use?

  • Right click any directory in the explorer panel
  • Select Boil a new component
  • enter the name
  • Submit

Configuration

You can use default templates to generate components preferences>extenstion>components boilerplate

here you can see this options

configuration definition options
typescript if true will generate .ts file boolean
framework if react will generate .jsx/.tsx file currently support: react
styling styling method generate .css/.scss scss

Whats are this Files??

The default templates ais opinionated, admittedly. They adhere to the principles of feature-based structuring, as promoted in this article by Max Stoiber.

You dont have to use the default templates and you should'nt.

Costumize templates

You can use a costum template boilerplate to generate your component just by adding a confguration file to the root folder. create a file in the root folder and name it components-boilerplate.js use this syntax [string=path,string=content][]

option definition
path:string path to the generated file example: path/to/file.js (create new file at selectedFolder/componentName/path/to/file.js)
content:string the content of the generated file.

content

the file content is the boilerplate code with a name placeholder We use mustache.js to replace the placeholders

placeholders

{{componentName}}: the name of component that you submit Use the backtick `` to avoid the missmatching

components-boilerplate.js is not a loaded as js you dont need to use any variable declaration you just need to declare an array with the defined configs

example

components-boilerplate.js

[
  [
    '{{componentName}}.tsx',
    `
  import React from 'react';
  import './styles/index{{StyleExtension}}';
  interface {{componentName}} {
  }

  function {{componentName}}({}: {{componentName}}) {
    return (
      <div className="{{componentName}}"></div>
    );
  }

  export default {{componentName}};

  `,
  ],
  [
    'index.ts',
    `
    import {{componentName}} from './{{componentName}}';
    export default {{componentName}};    
    `,
  ],
  ['style/index.scss', ``],
];

report issues an featues

create an issue

Roadmap

  • add suppoet for multiple templates
  • add support for multiple cases (now only name)

Download Details:

Author: Danzo7

Source Code: https://github.com/Danzo7/vscode-components-boilerplate

vue vuejs javascript

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

8 Popular Websites That Use The Vue.JS Framework

In this article, we are going to list out the most popular websites using Vue JS as their frontend framework. Vue JS is one of those elite progressive JavaScript frameworks that has huge demand in the web development industry. Many popular websites are developed using Vue in their frontend development because of its imperative features.

Vue Native is a framework to build cross platform native mobile apps using JavaScript

Vue Native is a framework to build cross platform native mobile apps using JavaScript. It is a wrapper around the APIs of React Native. So, with Vue Native, you can do everything that you can do with React Native. With Vue Native, you get

How to Make a Simple Vue Custom Select Component

In this article, you’ll learn how to build a Vue custom select component that can be easily be styled using your own CSS. In fact, it’s the same component that we use in production on Qvault, and you can see it in action on the playground.

Creating a Custom Tooltip Component in Vue

There are plenty of libraries out there that will have you up and running with a good tooltip solution in minutes. However, if you are like me, you are sick and tired of giant dependency trees that have the distinct possibility of breaking at any time.

Vue ShortKey plugin for Vue.js

Vue-ShortKey - The ultimate shortcut plugin to improve the UX .Vue-ShortKey - plugin for VueJS 2.x accepts shortcuts globaly and in a single listener.