# astroturf

> Extract and process inline CSS literals in JavaScript files

Latest version **1.2.0** (published 2023-03-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install astroturf
pnpm add astroturf
yarn add astroturf
bun add astroturf
```

Provides the command `astroturf`.

## Health

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

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.0 |
| Published | 2023-03-17 |
| First published | 2018-10-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 26 |
| Unpacked size | 157.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2283 |
| Author | Jason Quense |
| Maintainers | monastic.panic |

## Links

- npm: https://www.npmjs.com/package/astroturf
- Repository: https://github.com/4Catalyzer/astroturf
- Homepage: https://github.com/4Catalyzer/astroturf#readme
- Issues: https://github.com/4Catalyzer/astroturf/issues
- npm.io page: https://npm.io/package/astroturf

## Dependencies (26)

- [json5](https://npm.io/package/json5.md) ^2.2.1
- [yargs](https://npm.io/package/yargs.md) ^17.6.0
- [globby](https://npm.io/package/globby.md) ^11.0.0
- [lodash](https://npm.io/package/lodash.md) ^4.17.21
- [postcss](https://npm.io/package/postcss.md) ^8.4.18
- [resolve](https://npm.io/package/resolve.md) ^1.22.1
- [css-loader](https://npm.io/package/css-loader.md) ^5.1.3
- [picocolors](https://npm.io/package/picocolors.md) ^1.0.0
- [@babel/core](https://npm.io/package/@babel/core.md) ^7.19.6
- [common-tags](https://npm.io/package/common-tags.md) ^1.8.2
- [cosmiconfig](https://npm.io/package/cosmiconfig.md) ^7.0.1
- [unique-slug](https://npm.io/package/unique-slug.md) ^4.0.0
- [@babel/types](https://npm.io/package/@babel/types.md) ^7.20.0
- [magic-string](https://npm.io/package/magic-string.md) ^0.26.7
- [postcss-scss](https://npm.io/package/postcss-scss.md) ^4.0.5
- [find-cache-dir](https://npm.io/package/find-cache-dir.md) ^3.3.2
- [postcss-nested](https://npm.io/package/postcss-nested.md) ^5.0.6
- [@babel/template](https://npm.io/package/@babel/template.md) ^7.18.10
- [@babel/traverse](https://npm.io/package/@babel/traverse.md) ^7.20.0
- [@babel/generator](https://npm.io/package/@babel/generator.md) ^7.20.0
- [fast-levenshtein](https://npm.io/package/fast-levenshtein.md) ^3.0.0
- [@babel/code-frame](https://npm.io/package/@babel/code-frame.md) ^7.18.6
- [@modular-css/processor](https://npm.io/package/@modular-css/processor.md) ^28.1.4
- [webpack-virtual-modules](https://npm.io/package/webpack-virtual-modules.md) ^0.3.2
- [@babel/helper-module-imports](https://npm.io/package/@babel/helper-module-imports.md) ^7.18.6
- [@babel/plugin-transform-react-jsx](https://npm.io/package/@babel/plugin-transform-react-jsx.md) ^7.19.0

## Recent versions

- 1.2.0 (latest) — 2023-03-17
- 1.0.0-beta.29 (next) — 2021-12-14
- 1.1.0 — 2022-11-01
- 1.0.1 — 2022-01-31
- 1.0.0 — 2021-12-22
- 1.0.0-beta.28 — 2021-11-01
- 1.0.0-beta.27 — 2021-10-29
- 1.0.0-beta.26 — 2021-10-29
- 1.0.0-beta.25 — 2021-10-29
- 1.0.0-beta.24 — 2021-10-29
- 1.0.0-beta.23 — 2021-10-18
- 1.0.0-beta.22 — 2021-07-08
- 1.0.0-beta.21 — 2021-03-17
- 1.0.0-beta.20 — 2021-03-11
- 1.0.0-beta.19 — 2021-03-11
- … 57 more at https://npm.io/package/astroturf/versions

## README

# astroturf

**astroturf** lets you write CSS in your JavaScript files without adding any runtime layer, and with your existing CSS processing pipeline.

- **Zero runtime CSS-in-JS.** Get many of the same benefits as CSS-in-JS, but without the loss of flexibility in requiring framework-specific CSS processing, and while keeping your CSS fully static with no runtime style parsing.
- Use your existing tools – **Sass, PostCSS, Less** – but still write your style definitions in your JavaScript files
- **Whole component in the single file**. Write CSS in a template literal, then use it as if it were in a separate file

Checkout the docs for examples and API details: https://astroturfcss.github.io/astroturf/

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