0.1.5 • Published 9 years ago

seed-harvester v0.1.5

Weekly downloads
126
License
MIT
Repository
github
Last release
9 years ago

seed-harvester Build Status npm version Dependency Status

Automatically include seed pack dependencies for node-sass!

Table of Contents

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:

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:

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, except it magically finds and includes seed packs.

Thanks!

Many thanks to Alisdair for coming up with the name seed-harvester :heart:.

0.1.5

9 years ago

0.1.4

9 years ago

0.1.3

9 years ago

0.1.2

9 years ago

0.1.1

9 years ago

0.1.0

10 years ago

0.0.8

10 years ago

0.0.7

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago