Skip to content

Contributing Guidelines

James George edited this page Jul 6, 2020 · 11 revisions

First of all, Thank you for showing an interest in Mevn-CLI. This page walks you through all the necessary local development setup required if you are contributing to the codebase as well as the Docs.

Local Development setup

  • Fork and clone the mevn-cli repository.
  • Open up your terminal and navigate to the mevn-cli repo directory.
  • Add the remote upstream repository with git remote add upstream https://github.com/madlabsinc/mevn-cli.
  • Follow a rebase strategy to update your local branch with the latest changes that happened in the upstream repository.
  • Install the dependencies with npm install.
  • Now run npm run build by which babel transpile the existing es6 code to es5 that can be found within a lib directory.
  • Fire in npm link which creates a symlink by which you can access mevn globally from the terminal.
  • Now you can start working on your favorite feature 👏

Contributing helps people and makes the world simply a better place, without contributors this project would cease to exist.

The Codebase

Mevn-CLI is written in JavaScript (Node.js) following the Es6 semantics. It requires you to have familiarity with the language constructs as well as the es2015 standards such as arrow functions. We use commander.js as the argument parser. You can find a cli.js within the src directory where the configuration for the entire tool resides. Just spend some time familiarizing yourself with this file as it would give you an idea about the entire project hierarchy where all action handlers are brought about and invoked.

MEVN-CLI creates a .mevnrc file to keep track of the details specific to a project.

Mevn-CLI offers dedicated commands to deal with both the client and server side of the boilerplate template. When it comes to the Front End part Developers have the provision to create new components with ease or add his favorite dependency on the go without leaving the terminal. All he has to do is type in the respective command, sit back and relax while the dependencies get installed if that's the case. If you have worked on Vue.js before you may remember the pain that you faced while adding vuetify to your existing project or providing support state management with the vuex store.

For the server-side part, Mevn-CLI provides out of the box support for the MVC (Model-View-Controller) architecture where in which one can create the model, controller, and DB configuration files with ease. The user will be presented with all the 4 basic CRUD operations on top of which he can build upon. Deploy your web-app to any of the cloud hosting solutions as you wish (supports Heroku and Surge at present). All required from your side is to fire in the respective command and see the magic 🎉 The tool automatically creates a production build and your application will be live in a while.

Action handlers (Method to be invoked on firing in the respective command)can be found within src/commands directory relative to the root repository. We follow a file naming convention that is self-explanatory for the action handlers. For instance, you can find add.js which contains the action handler for add command.

Clone this wiki locally