# jss-cli

> A command line tool for JSS

Latest version **6.0.2** (published 2020-09-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install jss-cli
pnpm add jss-cli
yarn add jss-cli
bun add jss-cli
```

Provides the command `jss`.

## 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 | 6.0.2 |
| Published | 2020-09-24 |
| First published | 2015-06-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 7 |
| Unpacked size | 32.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 54 |
| Author | Oleg Slobodskoi |
| Maintainers | kof |
| Keywords | jss, cli |

## Links

- npm: https://www.npmjs.com/package/jss-cli
- Repository: https://github.com/cssinjs/cli
- Homepage: http://cssinjs.org
- Issues: https://github.com/cssinjs/cli/issues
- npm.io page: https://npm.io/package/jss-cli

## Dependencies (7)

- [css](https://npm.io/package/css.md) ^2.2.4
- [jss](https://npm.io/package/jss.md) ^10.1.1
- [lodash](https://npm.io/package/lodash.md) ^4.17.4
- [commander](https://npm.io/package/commander.md) ^2.8.1
- [require-dir](https://npm.io/package/require-dir.md) ^0.3.2
- [stringify-object](https://npm.io/package/stringify-object.md) ^3.3.0
- [jss-preset-default](https://npm.io/package/jss-preset-default.md) ^10.1.1

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 6.0.2 (latest) — 2020-09-24
- 6.0.1 — 2020-07-29
- 6.0.0 — 2020-04-21
- 5.0.2 — 2018-10-07
- 5.0.1 — 2018-01-26
- 5.0.0 — 2017-10-13
- 4.2.2 — 2017-10-13
- 4.2.1 — 2017-06-06
- 4.2.0 — 2017-05-23
- 4.0.1 — 2017-05-23
- 4.0.0 — 2017-05-23
- 3.0.1 — 2016-09-26
- 3.0.0 — 2016-04-09
- 2.0.0 — 2015-11-13
- 1.1.1 — 2015-11-11
- … 2 more at https://npm.io/package/jss-cli/versions

## README

# CLI for JSS

A command line tool for JSS

[![Gitter](https://badges.gitter.im/JoinChat.svg)](https://gitter.im/cssinjs/lobby)

![CLI Demo](https://raw.githubusercontent.com/cssinjs/cli/master/demo.gif)

## Convert CSS to JSS

```bash
# Convert CSS to JSS with multiline input support
jss convert -m
# Convert css to json
jss convert source.css -f json > source.js
# Convert css to commonjs
jss convert source.css -f js -e cjs > source.js
# Convert css to es6
jss convert source.css -f js -e es6 > source.js
```

## Convert JSS to CSS

You need either to run the cmd tool locally or to install JSS globally, because it will try to require JSS.
Also you can specify a path to JSS. Same is about JSS plugins.

```bash
# convert jss to css
jss convert source.js -f css > source.css
```

## API

```javascript
import {cssToJss} from 'jss-cli'

const css = `
  .container {
    visibility : hidden;
    color: black;
  }
`
cssToJss({code: css})
```

## Install

```bash
npm install jss-cli -g
```

## Issues

File a bug against [cssinjs/jss prefixed with \[cli\]](https://github.com/cssinjs/jss/issues/new?title=[cli]%20).

## License

MIT

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