Giter VIP home page Giter VIP logo

edcli's Introduction

edcli

npm package to create directories and files with basic node templates using UNIX like commands touch and mkdir.

Overview

I work with NodeJS for server side applications and manually create modules and JS files, although simple and small I got tired of repeating the same small task so I wrote this to automatically generate common files. This also helps to keep things consistent.

Why "edcli"? Because, "ed-cli" and "nodge-gen" were already taken.

Install

From NPM

npm install -g @ebarahona/edcli

Download or clone repo then:

$ cd edcli

$ npm install -g

Usage

Use the package from the directory where you would like to generate module folders or files

Create a file:

cd my-app
edcli touch <file-name> or <file-name.js>

Create a module (creates directory and index.js in given directory):

edcli mkdir <module-name>

Notes

Will convert camelcase names to dash (hyphen) separated names

Example output file

/* jshint node: true, devel: true */
'use strict';

/**
 * Required Dependencies 
 * go here
 */

const helloWorld = () => {
  console.log('Hello World');  
};

const API = {
    helloWorld
};

module.exports = API;

TODO:

Clean up

Add template options ie; --html, --js etc..

Add more commands

Add tests

Much more!

edcli's People

Contributors

ebarahona avatar

Watchers

James Cloos avatar Ed Barahona avatar

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.