# cherry-css

> CSS util that builds .css file that includes normalize.css, cherry-sass lib, and minified version of font-awesome with fonts which includes only specified icons

Latest version **0.9.3** (published 2017-09-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install cherry-css
pnpm add cherry-css
yarn add cherry-css
bun add cherry-css
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.9.3 |
| Published | 2017-09-27 |
| First published | 2017-08-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 9 |
| Known vulnerabilities | 0 (+7 in 2 direct dependencies) |
| Install scripts | no |
| Maintainers | cybercookie |
| Keywords | CSS, bundle, util, NodeJS, font-awesome, normalize, cherry |

## Links

- npm: https://www.npmjs.com/package/cherry-css
- Repository: https://github.com/CyberCookie/Cherry-css
- Issues: https://github.com/CyberCookie/Cherry-css/issues
- npm.io page: https://npm.io/package/cherry-css

## Dependencies (9)

- [postcss](https://npm.io/package/postcss.md) ^6.0.11
- [svg2ttf](https://npm.io/package/svg2ttf.md) ^4.1.0
- [ttf2eot](https://npm.io/package/ttf2eot.md) ^2.0.0
- [ttf2woff](https://npm.io/package/ttf2woff.md) ^2.0.1
- [node-sass](https://npm.io/package/node-sass.md) ^4.5.3
- [ttf2woff2](https://npm.io/package/ttf2woff2.md) ^2.0.3
- [autoprefixer](https://npm.io/package/autoprefixer.md) ^7.1.4
- [font-awesome](https://npm.io/package/font-awesome.md) ^4.7.0
- [normalize.css](https://npm.io/package/normalize.css.md) ^7.0.0

## Alternatives

- [style-dictionary](https://npm.io/package/style-dictionary.md) — 2.0M weekly downloads
- [postcss-merge-idents](https://npm.io/package/postcss-merge-idents.md) — 1.7M weekly downloads
- [@fontsource/noto-sans](https://npm.io/package/@fontsource/noto-sans.md) — 93.0K weekly downloads
- [uglifycss](https://npm.io/package/uglifycss.md) — 71.6K weekly downloads
- [mat4-interpolate](https://npm.io/package/mat4-interpolate.md) — 23.3K weekly downloads

## Recent versions

- 0.9.3 (latest) — 2017-09-27
- 0.9.21 — 2017-09-10
- 0.9.2 — 2017-09-09
- 0.9.11 — 2017-08-31
- 0.9.1 — 2017-08-29
- 0.9.0 — 2017-08-29

## README

# Cherry-css
The goal of this css util is to provide a small css bundle that contains everything you need for the begining. You can enable optional dependencies (subtasks) each of which brings it benefits.
### How to use
```sh
    npm i cherry-css
```
In your JS file do:
```sh
    require('cherry-css')({
        // overwrite default config 
    }).then(() => console.log('done'))
```
Util has it default config you can override by your own. Default config looks next:
```js
  out_bundle: './cherry_bundle.css',
  no_log: false,
  subtasks: {
    font_awesome: { /* subtask config */ },
    cherry: { /* subtask config */ },
    normalize: { /* subtask config */ }
  }
```
- `out_bundle` - path to output bundle css
- `no_log` - turn the logs

## Subtasks
### cherry
Small SASS lib that brings you such classes as:
   - mobile first responsive grid
        - `.xs-1` `.md-2` `.hg-6` .      
   - mobile first hide / show
        - `.hide-xs` `.show-md` `.hide-sm`
   - move left/right
        - `.move-right-6` `.move-left-1` 
   - add padding / margin
        - `.m-r-5` `p-b-30` `p-a-15` top/right/bottom/left/all 
   - css grid
        - `.col-start-6` `.row-end-10` 
   - mixins, common classes. More info will be added in future. Explore cherry-css/source/sass-source/core for now

SASS lib can be easily configured, You can define output classes or turn them off. This is SASS config you can redefine using the same variable's name somewhere in your own SASS file. Just specify pass to this SASS file using `user_vars_path` in a passed config.
```sass
$_C_media_value_map: (xs: 320px, sm: 480px, md: 767px, lg: 992px, hg: 1200px) 
//where key is a class name part and value is @media min-width

$_C_grid_columns: 12    // set 1 to turn it off
$_C_add_hide-show: true

$_C_add_move: true    

$_C_padding_values: 5 10 15 20 30 40      // set false to turn it off
$_C_margin_values: 5 10 15 20 30 40

$_C_max_grid_cols: 7    // set 1 to turn it off
$_C_max_grid_rows: 7
```
JS config looks next:
```js
subtasks: {
    cherry: {
        enabled: true,
        out_sass: '',
        user_vars_path: ''
    }
}
```
- `out_sass` - creates concatenated SASS file provided by cherry subtask. _path/filename_
- `user_vars_path` - _path/filename_ to redefined variables
### Font Awesome
You can specify font types, icons, help classes you need in your project and as result you get processed version of font-awesome which has only icons you specified. Also processed fonts like woff, woff2, ttf, eot, svg will be much more lighter. JS config looks next:
```js
subtasks: {
    font_awesome: {
        enabled: true,
        font_dest: './',
        css_font_src: '',
        font_types: ['woff'],
        icons: ['taxi'],
        help_classes: ['lg', '2x', '3x', '4x', '5x', 'fw', 'border']
    }
}
```
- `font_dest` - fonts output _dirname_
- `css_font_src` - by default it's relative path between `out_bundle` and `font_dest`, but you can specify more precisely
- `font_types` - _array_ of font types you will get after font-awesome will be processed
- `icons` - _array_ of font-awesome icons (http://fontawesome.io/icons)
- `help_classes` - _array_ of font-awesome help classes
### normalize
It just adds normalize to the output_bundle. Look at this for more info https://github.com/necolas/normalize.css/
```js
    subtasks: {
        normalize: {
            enabled: true
        }
    }
```

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