Skip to content

kalamuna/metalsmith-assets-convention

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Metalsmith Assets Convention Plugin NPM version

Build Status Dependency Status Greenkeeper badge

Metalsmith plugin to define static asset files through file conventions.

Installation

npm install --save metalsmith-assets-convention

CLI

If you are using the command-line version of Metalsmith, you can install via npm, and then add the metalsmith-assets-convention key to your metalsmith.json file:

{
  "plugins": {
    "metalsmith-assets-convention": {
      "extname": ".assets"
    }
  }
}

JavaScript

If you are using the JS Api for Metalsmith, then you can require the module and add it to your .use() directives:

var assets = require('metalsmith-assets-convention');

metalsmith.use(assets({
  extname: '.assets'
}));

Usage

Each static file copy is handled through naming the <name>.assets files. The file's metadata options are passed off to metalsmith-assets to copy the assets. All metalsmith-assets options apply, defined through each .static file:

Example

src/public.assets

---
source: public
destination: .
---
Copy all the public files into the build directory.
  • source represents the path to the original assets.
  • destination represents the path to where the final files will live. When not provided, will be where the original .asset file existed.

License

MIT

About

Metalsmith plugin to copy static assets through file conventions.

Resources

License

Stars

Watchers

Forks

Packages

No packages published