Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/makotot/get-assemble-partials
Get assemble partial files
https://github.com/makotot/get-assemble-partials
Last synced: 28 days ago
JSON representation
Get assemble partial files
- Host: GitHub
- URL: https://github.com/makotot/get-assemble-partials
- Owner: makotot
- Created: 2015-09-11T06:23:34.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-10-22T05:32:43.000Z (about 9 years ago)
- Last Synced: 2024-10-10T19:02:22.907Z (about 1 month ago)
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/get-assemble-partials
- Size: 137 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# get-assemble-partials
[![npm version](http://img.shields.io/npm/v/get-assemble-partials.svg?style=flat-square)](https://github.com/makotot/get-assemble-partials)
[![travis](http://img.shields.io/travis/makotot/get-assemble-partials.svg?style=flat-square)](https://github.com/makotot/get-assemble-partials)
[![dependencies](http://img.shields.io/david/makotot/get-assemble-partials.svg?style=flat-square)](https://github.com/makotot/get-assemble-partials)
[![devDependencies](http://img.shields.io/david/dev/makotot/get-assemble-partials.svg?style=flat-square)](https://github.com/makotot/get-assemble-partials)
[![License](http://img.shields.io/npm/l/get-assemble-partials.svg?style=flat-square)](https://github.com/makotot/get-assemble-partials)> Get [assemble](http://assemble.io/) partial files
## Install
```sh
$ npm i --save get-assemble-partials
```## Usage
In assemble plugin:
```js
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`
```js
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