Skip to content

Giuliano1993/make-js-component

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
cmd
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 

Make Js Component

Make Js Component is an NPX command born with the purpose of streamline the process for developers of creating components with the many FE frameworks around here.

Since some frameworks have standard commands, some had them, some really don't, the quickest thing is usually copy pasting compononent after component and then edit it.

MJC allows you to just call a command and have your JS component ready to use, and edit, with also a bunch of options available in order to start with the perfect boilerplate.

You can't find the framework or the options you need? Checkout the Contributing guide and open an issue to let us know and, if you wish, you can open a PR to have the feature inclued in the command!

Basic Usage

npx make-js-component

OR

npx make-js-component --name <NAME>

This will run a short wizard so you can easily create your component in few steps

Available Frameworks

Vue

When choosing Vue, the wizard will ask you whether you prefer to use the Options API or the Composition API, and you can make your selection using the arrow keys.

React

When choosing React, the wizard will ask you if you want to use TypeScript or not, and you can make your selection using the arrow keys.

Angular

Qwik

Svelte

Contributing

Read the Contributing guide for the contribution process

Setup locally

If you're cloning the repo, both for contributing or just to start taking confidence with the code just follow these steps:

  1. clone the repo with git clone https://github.com/Giuliano1993/make-js-component
  2. inside the folder run npm install
  3. then to transpile ts files into js and watch them, run npm run dev

To run your local version of the package and test it, run

npx .