Neverending Puppy Marathon
    Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    metalsmith-mime-typepublic

    metalsmith-mime-type

    nodei.co

    npm

    github-issues

    stars

    forks

    metalsmith plugin to detect mime types from file contents

    This plugin is a thin wrapper around mmmagic which inspects the contents of files to determine mime type rather than simply looking up the file extension

    Take a look at the annotated source

    install

    npm i --save metalsmith-mime-type

    usage

    mimeType = require('metalsmith-mime-type')
     
    metalsmith(__dirname)
    .use(mimeType(['**/*','!*.jpg']))
    .build(callback)

    options

    A single option, src is used as a minimatch mask to determine what files need to to have mimetypes assigned. can be passed in as an object property, or as a string. See usage example.

    compatibility

    dist/index.js is fully compatible with Node 6.3.1

    dist/node4/index.js is fully compatible with Node 4 LTS, require it like so: var mimeType = require('metalsmith-mime-type/dist/node4')

    Author

    Levi Wheatcroft levi@wht.cr

    Contributing

    Contributions welcome; Please submit all pull requests against the master branch.

    License

    install

    npm i metalsmith-mime-type

    Downloadslast 7 days

    0

    version

    0.1.4

    license

    MIT

    repository

    github.com

    last publish

    collaborators

    • avatar