An open API service indexing awesome lists of open source software.

https://github.com/idiocc/example-package

An example package created with MNP.
https://github.com/idiocc/example-package

t

Last synced: about 1 year ago
JSON representation

An example package created with MNP.

Awesome Lists containing this project

README

          

# @artdeco/example-package

[![npm version](https://badge.fury.io/js/@artdeco/example-package.svg)](https://www.npmjs.com/package/@artdeco/example-package)

`@artdeco/example-package` is An example package created with MNP.

```sh
yarn add @artdeco/example-package
```

## Table Of Contents

- [Table Of Contents](#table-of-contents)
- [API](#api)
- [`async examplePackage(config: !Config): string`](#async-mynewpackageconfig-config-string)
* [`Config`](#type-config)
- [CLI](#cli)
- [Copyright & License](#copyright--license)



## API

The package is available by importing its default function:

```js
import examplePackage from '@artdeco/example-package'
```



## async examplePackage(
  `config: !Config,`
): string
An example package created with MNP.

- config* !Config: The config.

__`Config`__: Options for the program.

| Name | Type | Description | Default |
| --------- | ---------------- | ----------------- | ------- |
| shouldRun | boolean | A boolean option. | `true` |
| text | string | A text to return. | - |

```js
import examplePackage from '@artdeco/example-package'

(async () => {
const res = await examplePackage({
text: 'example',
})
console.log(res)
})()
```
```
@artdeco/example-package called with example
example
```



## CLI

The package can also be used from the CLI.



Argument
Short
Description



input

The path to the input file.


--output
-o
Where to save the output. By default prints to stdout. Default -.


--init
-i
Initialise in the current folder.


--help
-h
Print the help information and exit.


--version
-v
Show the version's number and exit.

```
An example package created with MNP.

example-package input [-o output] [-ihv]

input The path to the input file.
--output, -o Where to save the output. By default prints to stdout.
Default: -.
--init, -i Initialise in the current folder.
--help, -h Print the help information and exit.
--version, -v Show the version's number and exit.

Example:

example-package example.txt -o out.txt
```



## Copyright & License

GNU Affero General Public License v3.0


idiocc
© Art Deco™ 2019