# seed-harvester

> Automatically include seed pack dependencies for node-sass

Latest version **0.1.5** (published 2016-12-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install seed-harvester
pnpm add seed-harvester
yarn add seed-harvester
bun add seed-harvester
```

## 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.1.5 |
| Published | 2016-12-16 |
| First published | 2016-07-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=4 |
| Dependencies | 5 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Maintainers | itsjonq |
| Keywords | bem, css, design, functional, itcss, harvester, modular, oocss, performance, seed, scss |

## Links

- npm: https://www.npmjs.com/package/seed-harvester
- Repository: https://github.com/helpscout/seed-harvester
- Homepage: https://github.com/helpscout/seed-harvester#readme
- Issues: https://github.com/helpscout/seed-harvester/issues
- npm.io page: https://npm.io/package/seed-harvester

## Dependencies (5)

- [find-root](https://npm.io/package/find-root.md) ^1.0.0
- [lodash.uniqby](https://npm.io/package/lodash.uniqby.md) ^4.7.0
- [sass-pathfinder](https://npm.io/package/sass-pathfinder.md) 0.0.5
- [seed-packfinder](https://npm.io/package/seed-packfinder.md) 0.0.3
- [lodash.flattendeep](https://npm.io/package/lodash.flattendeep.md) ^4.4.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.1.5 (latest) — 2016-12-16
- 0.1.4 — 2016-11-21
- 0.1.3 — 2016-10-31
- 0.1.2 — 2016-10-31
- 0.1.1 — 2016-10-31
- 0.1.0 — 2016-09-28
- 0.0.8 — 2016-08-07
- 0.0.7 — 2016-08-07
- 0.0.6 — 2016-07-28
- 0.0.5 — 2016-07-28
- 0.0.4 — 2016-07-28
- 0.0.3 — 2016-07-28
- 0.0.2 — 2016-07-28
- 0.0.1 — 2016-07-27

## README

# seed-harvester [![Build Status](https://travis-ci.org/helpscout/seed-harvester.svg?branch=master)](https://travis-ci.org/helpscout/seed-harvester) [![npm version](https://badge.fury.io/js/seed-harvester.svg)](https://badge.fury.io/js/seed-harvester) [![Dependency Status](https://david-dm.org/helpscout/seed-harvester.svg)](https://david-dm.org/helpscout/seed-harvester)

Automatically include seed pack dependencies for node-sass!


**Table of Contents**

- [Install](#install)
- [Basic Usage](#basic-usage)
  - [1. Set up harvester with Sass](#1-set-up-harvester-with-sass)
  - [2. Add seed packs!](#2-add-seed-packs)
- [Including custom paths](#including-custom-paths)
- [Options](#options)
  - [harvester(arguments)](#harvesterarguments)
- [Thanks!](#thanks)


## Install
```
npm install seed-harvester --save-dev
```


## Basic Usage

### 1. Set up harvester with Sass
This seed pack needs to be imported into your sass pipeline. Below is an example using Gulp:

```javascript
var gulp = require('gulp');
var sass = require('gulp-sass');
var harvester = require('seed-harvester');

gulp.task('sass', function () {
  return gulp.src('./sass/**/*.scss')
    .pipe(sass({
      includePaths: harvester()
    }))
    .pipe(gulp.dest('./css'));
});
```

### 2. Add seed packs!

Add seed packs by using `npm install`, example:

```
npm install seed-grid --save
```

Because `seed-harvester` was setup (step 1), it will automatically add `seed-grid` into your includePaths for you.

Note: The seed pack **must** contain the keyword `seed-pack`.

Note 2: The seed pack **must also** be either a dependency or devDependency defined in your `package.json` (installed with the `--save` or `--save-dev` flag).


## Including custom paths

You can also include additional paths by passing them as arguments to harvester. If we take the above `gulp` example, it would look like this:

```javascript
var gulp = require('gulp');
var sass = require('gulp-sass');
var harvester = require('seed-harvester');

var includePaths = harvester(
  'scss/',
  ['node_modules/my-custom-sass-package', 'node_modules/another-sass-thing'],
  'vendor/scss/project'
);

gulp.task('sass', function () {
  return gulp.src('./sass/**/*.scss')
    .pipe(sass({
      includePaths: includePaths
    }))
    .pipe(gulp.dest('./css'));
});
```

In the above example, harvester will include all applicable seed packs and resolve all the paths passed (this assumes they're valid paths to begin with).


## Options

### harvester(arguments)
Type: `String`, `Array` | Default: `[]`
Returns: Array

Pass along strings or arrays as arguments to harvester. This package works just like [sass-pathfinder](https://github.com/ItsJonQ/sass-pathfinder), except it magically finds and includes seed packs.


## Thanks!

Many thanks to [Alisdair](https://github.com/alisdair) for coming up with the name `seed-harvester` :heart:.

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