2.1.1 • Published 5 years ago

metalsmith-assets-convention v2.1.1

Weekly downloads
25
License
MIT
Repository
github
Last release
5 years ago

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

2.1.1

5 years ago

2.1.0

5 years ago

2.0.0

5 years ago

1.2.1

5 years ago

1.2.0

6 years ago

1.1.0

8 years ago

1.0.0

8 years ago

0.0.1

8 years ago