Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/artdecocode/yarn-s
Run Multiple Yarn Commands In Series.
https://github.com/artdecocode/yarn-s
serial series yarn
Last synced: 5 days ago
JSON representation
Run Multiple Yarn Commands In Series.
- Host: GitHub
- URL: https://github.com/artdecocode/yarn-s
- Owner: artdecocode
- License: agpl-3.0
- Created: 2019-12-05T20:50:04.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-02-03T02:31:34.000Z (almost 5 years ago)
- Last Synced: 2024-10-12T23:11:28.221Z (about 1 month ago)
- Topics: serial, series, yarn
- Language: JavaScript
- Size: 95.7 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# yarn-s
[![npm version](https://badge.fury.io/js/yarn-s.svg)](https://www.npmjs.com/package/yarn-s)
`yarn-s` is Run Multiple Yarn Commands In Series.
```sh
yarn add yarn-s
```## Table Of Contents
- [Table Of Contents](#table-of-contents)
- [API](#api)
- [`async yarnS(config: !Config): !Array`](#async-yarnsconfig-config-arrayscriptresult)
* [`Config`](#type-config)
* [`ScriptResult`](#type-scriptresult)
- [CLI](#cli)
- [Copyright & License](#copyright--license)## API
The package is available by importing its default function:
```js
import yarnS from 'yarn-s'
```##
async yarnS(
`config: !Config,`): !Array
Run Multiple Yarn Commands In Series.- config*
!Config
: The config.__`Config`__: Options for the program.
| Name | Type | Description |
| ------------ | ----------------------------- | ----------------------- |
| __scripts*__ | !Array<string> | The scripts to execute. |__`ScriptResult`__: The result of a script.
| Name | Type | Description |
| ----------- | --------------- | -------------------------- |
| __code*__ | number | The exit code. |
| __stdout*__ | string | The stdout of the program. |
| __stderr*__ | string | The stderr of the program. |```js
import yarnS from 'yarn-s'(async () => {
const res = await yarnS({
scripts: ['pass'],
})
console.log(res)
})()
```
```
$ node test/fixture/pass
this file is fine
[ { code: 0,
stdout: '$ node test/fixture/pass\nthis file is fine\n',
stderr: '' } ]
```## CLI
The package can also be used from the CLI.
Argument
Short
Description
scripts
The scripts to execute in series.
--help
-h
Print the help information and exit.
--version
-v
Show the version's number and exit.
```
Run Multiple Yarn Commands In Series.yarn-s script[,script,...]
scripts The scripts to execute in series.
--help, -h Print the help information and exit.
--version, -v Show the version's number and exit.Example:
yarn-s script-1 script-2
```The program will exit with status code 1 if one of the scripts exited with non-zero code.
passfail
```js
process.stdout.write('this file is fine\n')
``````js
process.stdout.write('hello wor')
process.exit(1)
```**yarn-s pass fail**
```
$ node test/fixture/pass
this file is fine
$ node test/fixture/fail
hello worinfo Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Command "fail" existed with code 1
```## Copyright & License
GNU Affero General Public License v3.0
© Art Deco™ 2020