0.1.0 • Published 9 years ago

get-assemble-partials v0.1.0

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

get-assemble-partials

npm version travis dependencies devDependencies License

Get assemble partial files

Install

$ npm i --save get-assemble-partials

Usage

In assemble plugin:

var getPartials = require('get-assemble-partials');

module.exports = function (params, cb) {

  getPartials(params, function (err, data) {
    console.log(data);
    // => [ 'src/partials/footer.hbs',
            'src/partials/header.hbs',
            'src/partials/nav.hbs',
            ... ]
    cb();
  });
};

module.exports.options = {
  stage: 'render:post:pages'
};

Options

excludes

A list of glob pattern that you want to exclude.

type: array

var getPartials = require('get-assemble-partials');

module.exports = function (params, cb) {

  var excludes = ['./src/partials/excludes/*.hbs'];

  getPartials(params, excludes, function (err, data) {
    console.log(data);
    // => [ 'src/partials/footer.hbs',
            'src/partials/header.hbs',
            'src/partials/nav.hbs',
            ... ]
    cb();
  });
};

module.exports.options = {
  stage: 'render:post:pages'
};

License

MIT