@ebarahona/edcli
Create new NodeJS empty files and module directories with touch and mkdir
Last updated 2 years ago by ebarahona .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @ebarahona/edcli -g
SYNC missed versions from official npm registry.

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" was already taken.

Install

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.export = API;

TODO:

Clean up

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

Add more commands

Add tests

Much more!

Current Tags

  • 1.0.1                                ...           latest (2 years ago)

2 Versions

  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 4
Dependencies (4)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |