npm.io
1.0.1 • Published 9 years agoCLI

posthtml-tape

Licence
CC0-1.0
Version
1.0.1
Deps
0
Vulns
0
Weekly
0

PostHTML Tape PostHTML

NPM Version Build Status Licensing Changelog Gitter Chat

PostHTML Tape lets you quickly test PostHTML plugins.

  1. Install this dependency to your project:

    npm install --save-dev posthtml-tape
  2. Add the posthtml-tape task to your package.json:

    {
       "scripts": {
         "tape": "posthtml-tape"
       }
    }
  3. Add tests to your .tape.js file:

    module.exports = {
         'posthtml-my-plugin': {
             'basic': {
                 message: 'supports basic usage'
             }
         }
    };

That’s it! Now you can use the tape task:

npm run tape

Options

Options may be passed through package.json using posthtmlConfig:

{
	"posthtmlConfig": {
		"plugin": "path/to/plugin.js",
		"config": "path/to/.tape.js",
		"fixtures": "path/to/htmldir"
	}
}

Options may be passed through arguments:

posthtml-tape --plugin=path/to/plugin.js --config=path/to/.tape.js

Keywords