# function-factory

> Simple, minimalist templating from the command line.

Latest version **6.0.0** (published 2023-02-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install function-factory
pnpm add function-factory
yarn add function-factory
bun add function-factory
```

Provides the command `function-factory`.

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 6.0.0 |
| Published | 2023-02-20 |
| First published | 2021-02-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=14.8.0 |
| Dependencies | 11 |
| Unpacked size | 186.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Anadian |
| Maintainers | anad |
| Keywords | templating, text, source, dev, ops, operations, development, mustache, handlebars, cli, command, line, app, application, libre, free, open, mit, macro |

## Links

- npm: https://www.npmjs.com/package/function-factory
- Repository: https://github.com/Anadian/function-factory
- Homepage: https://github.com/Anadian/function-factory#readme
- Issues: https://github.com/Anadian/function-factory/issues
- npm.io page: https://npm.io/package/function-factory

## Dependencies (11)

- [lodash](https://npm.io/package/lodash.md) ^4.17.21
- [cno-insp](https://npm.io/package/cno-insp.md) ^1.0.0
- [inquirer](https://npm.io/package/inquirer.md) ^9.1.4
- [clipboardy](https://npm.io/package/clipboardy.md) ^3.0.0
- [get-stream](https://npm.io/package/get-stream.md) ^6.0.1
- [handlebars](https://npm.io/package/handlebars.md) ^4.7.7
- [command-line-args](https://npm.io/package/command-line-args.md) ^5.2.1
- [cno-config-manager](https://npm.io/package/cno-config-manager.md) ^0.1.1
- [command-line-usage](https://npm.io/package/command-line-usage.md) ^6.1.3
- [simple-package-meta](https://npm.io/package/simple-package-meta.md) ^0.0.3
- [application-log-winston-interface](https://npm.io/package/application-log-winston-interface.md) ^3.1.0

## Alternatives

- [async-exit-hook](https://npm.io/package/async-exit-hook.md) — 3.7M weekly downloads
- [evnty](https://npm.io/package/evnty.md) — 7.2K weekly downloads
- [eleventy-plugin-asciidoc](https://npm.io/package/eleventy-plugin-asciidoc.md) — 3.5K weekly downloads
- [@jswork/next-get2get](https://npm.io/package/@jswork/next-get2get.md) — 945 weekly downloads
- [@dashersw/axon](https://npm.io/package/@dashersw/axon.md) — 934 weekly downloads

## Recent versions

- 6.0.0 (latest) — 2023-02-20
- 5.0.1 — 2022-10-16
- 4.0.0 — 2022-06-24
- 3.0.0 — 2022-06-23
- 2.2.4 — 2021-09-25
- 2.2.3 — 2021-09-15
- 2.2.2 — 2021-06-14
- 2.2.1 — 2021-05-13
- 2.2.0 — 2021-04-16
- 2.1.5 — 2021-02-23
- 2.1.4 — 2021-02-23
- 2.1.3 — 2021-02-22
- 2.1.2 — 2021-02-22
- 2.1.0 — 2021-02-22
- 2.0.0 — 2021-02-22

## README

# function-factory
[![standard-readme compliant](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)
[![Semantic Versioning 2.0.0](https://img.shields.io/badge/semver-2.0.0-brightgreen?style=flat-square)](https://semver.org/spec/v2.0.0.html)
[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg?style=flat-square)](https://conventionalcommits.org)
[![License](https://img.shields.io/github/license/Anadian/function-factory)](https://github.com/Anadian/function-factory/blob/master/LICENSE)
[![npm](https://img.shields.io/npm/v/function-factory)](https://www.npmjs.com/package/function-factory)

> Simple, minimalist templating from the command line.
# Table of Contents
- [Background](#Background)
- [Install](#Install)
- [Usage](#Usage)
- [API](#API)
- [Contributing](#Contributing)
- [License](#License)
# Background
# Install
Example using [pnpm](https://pnpm.io/cli/add):
```sh
pnpm add --save function-factory
```
It can, of course, also be installed by [npm](https://docs.npmjs.com/cli/v8/commands/npm-install) or [Yarn](https://yarnpkg.com/getting-started/usage) using the normal methods.
# Usage
To use the command-line interface:
```sh
[pnpm] function-factory [options]
```
Remember to prepend `pnpm` to the command when you haven't installed it globally.
## CLI
```
function-factory

  Simple, minimalist templating from the command line. 

Options

  -h, --help                       Writes this help text to STDOUT.                                              
  -n, --noop                       [Reserved] Show what would be done without actually doing it.                 
  -v, --verbose                    Verbose output to STDERR.                                                     
  -V, --version                    Writes version information to STDOUT.                                         
  -x, --no-quick-exit              Don't immediately exit after printing help, version, and/or config            
                                   information.                                                                  
  -i, --stdin                      Read input from STDIN.                                                        
  -I, --input string               The path to the file to read input from.                                      
  -e, --edit string                Edit the input in $EDITOR, optionally specifying a file in the "defaults"     
                                   directory to use as a base.                                                   
  -a, --ask string                 [Reserved] Interactively prompt for input properties, optionally specifying a 
                                   file in the "defaults" directory to use as a base.                            
  -D, --do string                  [Reserved] Select a default input file and an output template based on a      
                                   single string.                                                                
  -o, --stdout                     Write output to STDOUT.                                                       
  -O, --output string              The name of the file to write output to.                                      
  -p, --pasteboard                 Copy output to pasteboard (clipboard).                                        
  -c, --config                     Print search paths and configuration values to STDOUT.                        
  -C, --config-file string         Use the given config file instead of the default.                             
  -d, --defaults                   [Reserved] Print a list of the "defaults" files.                              
  -l, --templates                  [Reserved] Print a list of available templates to stdout.                     
  -T, --template-override string   Override the template to the file specified.
```
# API
```js
import FunctionFactory from 'function-factory';

FunctionFactory.load( options );
```
See [docs/lib.md](docs/lib.md) for full API.
# Contributing
Changes are tracked in [CHANGELOG.md](CHANGELOG.md).
# License
MIT ©2020-2022 Anadian

SEE LICENSE IN [LICENSE](LICENSE)

[![Creative Commons License](https://i.creativecommons.org/l/by-sa/4.0/88x31.png)](http://creativecommons.org/licenses/by-sa/4.0/)\
This project's documentation is licensed under a [Creative Commons Attribution-ShareAlike 4.0 International License](http://creativecommons.org/licenses/by-sa/4.0/).

---
_Source: https://npm.io/package/function-factory · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
