Need private packages and team management tools?Check out npm Teams »

@hugojosefson/example-cli

2.1.1 • Public • Published

Node.js example CLI app

Build Status npm page License ISC SemVer 2.0.0 JavaScript Style Guide

Introduction

This is a simple CLI app in Node.js, using ES Modules.

Using as a template

To use this project as a template for your own project, you can do this:

mkdir my-cli
cd my-cli
git init
curl https://codeload.github.com/hugojosefson/nodejs-example-cli/tar.gz/master | tar xzv --strip-components=1
git add --all
git commit -m 'Add template files from nodejs-example-cli.'
yarn

Then edit package.json and go on developing!

Prerequisite

Node.js, at least v12.0.0.

Recommended to install latest via nvm:

nvm install stable

Usage

npx --package @hugojosefson/example-cli example-cli "Your Name"

Will say hello to you.

Programmatic access

You can also import the module, and use its exported functions programmatically.

API

Table of Contents

generateGreeting

Generates a greeting

Parameters

Returns Promise<String> A Promise of a greeting.

identity

Returns the supplied argument.

Parameters
  • a any Any argument.

Returns any The argument a.

Install

npm i @hugojosefson/example-cli

DownloadsWeekly Downloads

1

Version

2.1.1

License

MIT

Unpacked Size

9.85 kB

Total Files

8

Last publish

Collaborators

  • avatar