# cross-script

> cross-platform command script as subset of bash

Latest version **1.0.5** (published 2017-05-25) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install cross-script
pnpm add cross-script
yarn add cross-script
bun add cross-script
```

Provides the command `cross-script`.

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2017-05-25 |
| First published | 2017-05-25 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Mikey |
| Maintainers | ahdinosaur |

## Links

- npm: https://www.npmjs.com/package/cross-script
- Repository: https://github.com/ahdinosaur/cross-script
- Homepage: https://github.com/ahdinosaur/cross-script#readme
- Issues: https://github.com/ahdinosaur/cross-script/issues
- npm.io page: https://npm.io/package/cross-script

## Dependencies (4)

- [execall](https://npm.io/package/execall.md) ^1.0.0
- [@f/zip-obj](https://npm.io/package/@f/zip-obj.md) ^1.1.1
- [cross-spawn](https://npm.io/package/cross-spawn.md) ^5.1.0
- [es6-template-regex](https://npm.io/package/es6-template-regex.md) ^1.0.0

## Recent versions

- 1.0.5 (latest) — 2017-05-25
- 1.0.4 — 2017-05-25
- 1.0.2 — 2017-05-25
- 1.0.1 — 2017-05-25
- 1.0.0 — 2017-05-25

## README

# cross-script

cross-platform command script as subset of bash

```shell
npm install --save cross-script
```

created so i can run the following to rebuild electron apps cross-platform:

```shell
cross-script npm rebuild --runtime=electron --target=$(electron -v) --abi=$(electron --abi) --disturl=https://atom.io/download/atom-shell
```

## example

```shell
NODE_ENV=test # or the equivalent on Windows
cross-script echo ${NODE_ENV} $(node -v)
# on POSIX (Linux and macOS) this will be evaluated by `bash`
# on Windows this will be evaluated by `cross-script`
test v6.2.1
```

## usage

### `cross-script <command> [args...]`

where each argument can be:

- `anything`
- `${ENVIRONMENT_VARIABLE}`
- `$(command substitution)`

## license

The Apache License

Copyright &copy; 2017 Michael Williams

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

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