Skip to content
This repository has been archived by the owner on Jun 1, 2021. It is now read-only.

marianhlavac/metalsmith-another-source

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

metalsmith-another-source

A Metalsmith plugin that allows you to specify more than one sources for your input files.

Useful when you need to load additional files from another directory, than your source directory.

Installation

  $ yarn add metalsmith-another-source

Usage

Use before other middlewares to work with loaded files, so make it the first .use in your Metalsmith middleware chain.

  const anotherSource = require('metalsmith-another-source')

  ... 
  
  Metalsmith(__dirname)
  .source('./source')
  .destination('../tmp')

  .use(anotherSource('./another-source'))
  
  ...
  

API

anotherSource(directory [, pattern])

Returns a plugin.

directory (String)
A path to the directory to be added as another source. Is relative to Metalsmith directory set with Metalsmith(...).

pattern (Regexp)
Regexp matching files to be included. When not present, all files in directory will be included.

About

A Metalsmith plugin that allows you to specify more than one sources for your input files.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published