{"name":"postcss-tape","description":"Quickly test PostCSS plugins","version":"6.0.0","type":"commonjs","main":"./dist/index.js","bin":{"postcss-tape":"dist/index.js"},"repository":{"type":"git","url":"git+https://github.com/csstools/postcss-tape.git"},"author":{"name":"Jonathan Neal","email":"jonathantneal@hotmail.com"},"homepage":"https://github.com/csstools/postcss-tape#readme","bugs":{"url":"https://github.com/csstools/postcss-tape/issues"},"license":"CC0-1.0","scripts":{"build":"rollup --config --silent","prepublish":"npm test","pretest:tape":"npm run build","test":"npm run test:js && npm run test:tape","test:js":"eslint src/{*,**/*}.js --cache --ignore-pattern .gitignore","test:tape:7":"node . --plugin test/postcss7-plugin.js --config test","test:tape:8":"node . --plugin test/postcss8-plugin.js --config test","test:tape":"npm run test:tape:7 && npm run test:tape:8","test:tape:ci":"npm run test:tape:7 -- --ci true && npm run test:tape:8 -- --ci true"},"engines":{"node":"^10 || ^12 || ^14"},"peerDependencies":{"postcss":"^7 || ^8"},"devDependencies":{"@babel/core":"^7.11.6","@babel/preset-env":"^7.11.5","eslint":"^7.9.0","magic-string":"^0.25.7","postcss":"^8.0.5","rollup":"^2.27.1","rollup-plugin-babel":"^4.4.0"},"eslintConfig":{"env":{"browser":true,"es6":true,"node":true},"extends":"eslint:recommended","parserOptions":{"ecmaVersion":12,"impliedStrict":true,"sourceType":"module"},"root":true,"rules":{"semi":["error","never"]}},"prettier":{"arrowParens":"avoid","bracketSpacing":true,"endOfLine":"lf","printWidth":360,"quoteProps":"consistent","semi":false,"singleQuote":true,"trailingComma":"all","useTabs":true},"keywords":["postcss","css","postcss-plugin","testing","tests","tools","tape"],"gitHead":"68982feba2e94d754b67e97ca963b0d4bec4b75b","_id":"postcss-tape@6.0.0","_nodeVersion":"14.4.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-gfwBh9NPzeSSTWwNnkhtPAtTGSr70/3zLyzIdjB54LwaKBe//QjlmX7PBsUN3EVRNIBhghAESQ+ugkUjLiCQVw==","shasum":"7d351d507bebdff95ecbda0802dc82e394eeab83","tarball":"http://registry-npm.ywwl.com/postcss-tape/download/postcss-tape-6.0.0.tgz","fileCount":28,"unpackedSize":72045,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfZQaxCRA9TVsSAnZWagAAA1UQAJ30IXPROTrLot4lGkE/\nA4q2E/liX4bbEvDGuaio9aGwk9QH10xiuSeD1F5BU8p2PRSQXWmkBpGG0QU/\nP5GSUhZfZ7fQRT+mOdnV22W4Uk9dtXC6HgL/t2/Du13Q5UvtlHi/96PK/gac\njMIsFtjL0paq60zHyWACHgOeK3Zb9+7ZtAUCMkwJDMuYkZ9IOWahzfcMC8it\nWXuwuXc/VjQ6cykAEF2gZVrGOjNjW9pnPTsesC944mgz+QomYABa8GhO9dh8\ns1KmlWcjq/pIWudYN4YCzVTRGxLCyyyWn4KfFHbzuCp8e1Ia2X7UGLiNiVyF\nVggOkubMp4RloaggwZpkqgt/rusj2VgocUSVFU3NbgtpfgdQdLF36LyyrnmL\n3OXiGtokI0CWfx28n+ZKE7fAEL4Ol5s/RrpsLqbL3s/dq1mgBsYQUhOU+K4t\nvcZn77Zpm7RXU2Ok3ysyf1aOSi9AT3RKp8/k7N7mlgj235OujpZnpDZ52V3Z\nB1/zQWpS+kw/6EN9DMSklbGFB/nzmCkCob2BfiZwVIDL9MfNZlyc4LaTkYpk\nNPKGeFVyg/EyDrvjMFWF2ra7YmNz6EC/8HClp+dfhA/peBIrpo+5W0+FVX2z\nG1mIq/4v1Qr3UcfItPylAH1yhXl0VNHLo7XChp57fjhltQY0LMb04og/+jpR\ndZds\r\n=tiZJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCJblcyw4MVirRDYo9WWT4uQLc/n9LCS7h8YoCxPn0WBwIhANUZgxCd2G8qV/E5o4U9GClz7yeaTTibnPTj9cXqz921"}],"size":19839,"noattachment":false,"key":"/postcss-tape/-/postcss-tape-6.0.0.tgz"},"maintainers":[{"name":"jonathantneal","email":"jonathantneal@hotmail.com"}],"_npmUser":{"name":"jonathantneal","email":"jonathantneal@hotmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/postcss-tape_6.0.0_1600456368606_0.2692242811084591"},"_hasShrinkwrap":false,"readme":"# PostCSS Tape [<img src=\"http://postcss.github.io/postcss/logo.svg\" alt=\"PostCSS\" width=\"90\" height=\"90\" align=\"right\">][PostCSS]\n\n[<img alt=\"NPM Version\" src=\"https://img.shields.io/npm/v/postcss-tape.svg\" height=\"20\">][npm-url]\n[<img alt=\"Build Status\" src=\"https://img.shields.io/travis/csstools/postcss-tape/main.svg\" height=\"20\">][cli-url]\n[<img alt=\"Support Chat\" src=\"https://img.shields.io/badge/support-chat-blue.svg\" height=\"20\">][git-url]\n\n[PostCSS Tape] lets you quickly test [PostCSS] plugins.\n\n1. Install this dependency to your project:\n   ```sh\n   npm install postcss-tape --save-dev\n   ```\n\n2. Add the `postcss-tape` task to your `package.json`:\n   ```json\n   {\n      \"scripts\": {\n        \"test\": \"postcss-tape\"\n      }\n   }\n   ```\n\n3. Add tests to your `.tape.js` file:\n   ```js\n   export default {\n     'basic': {\n       message: 'supports basic usage'\n     }\n   };\n   ```\n\nThat’s it! Empty tests will be auto-generated.\n\n```sh\nnpm test\n```\n\n## Options\n\nOptions may be passed through `package.json` using `postcssConfig`:\n\n```json\n{\n  \"postcssConfig\": {\n    \"plugin\": \"path/to/plugin.js\",\n    \"config\": \"path/to/.tape.js\",\n    \"fixtures\": \"path/to/cssdir\"\n  }\n}\n```\n\nOptions may be passed through arguments:\n\n```sh\npostcss-tape --plugin path/to/plugin.js --config path/to/.tape.js\n```\n\n## Test Options\n\n### message\n\nThe message provided to the console to identify the test being run.\n\n```js\n{\n  'some-test': {\n    message: 'supports some test usage'\n  }\n}\n```\n\n### options\n\nThe options passed into the PostCSS plugin for the test.\n\n```js\n{\n  'some-test': {\n    options: {\n      someOption: true,\n      anotherOption: 5,\n      etc: 'etc'\n    }\n  }\n}\n```\n\n### processOptions\n\nThe process options passed into PostCSS for the test. Read the\n[PostCSS documentation](http://api.postcss.org/global.html#processOptions) for\nmore details.\n\n```js\n{\n  'some-test': {\n    processOptions: {\n      map: {\n        inline: true,\n        sourcesContent: true\n      }\n    }\n  }\n}\n```\n\n### warnings\n\nEither the number of warnings expected to be generated by the test, or an\nobject used to match warnings given by the test.\n\n```js\n{\n  'some-test': {\n    warnings: 3\n  }\n}\n```\n\n```js\n{\n  'some-test': {\n    warnings: {\n      text: /should warn/\n    }\n  }\n}\n```\n\n### error\n\nAn object used to match an error thrown by the test.\n\n```js\n{\n  'some-test': {\n    error: {\n      message: 'You should not have done that'\n    }\n  }\n}\n```\n\nIn that example, the error expects a field of `message` to be the string\n`You should not have done that`. So that an error can be inspecific, regular\nexpressions may also be used, so that something like\n`message: /^You should not have done/` would also match\n`You should not have done this`.\n\n### source\n\nThe location of the source CSS file, relative to the `fixtures` directory. This\nfile is passed through the PostCSS plugin.\n\n```js\n{\n  'some-test': {\n    source: 'alterate-source.css'\n  }\n}\n```\n\nIn that example, a `some-test` field would automatically populate the\n`source` as `some-test.css` unless it was overridden. In order that multiple\ntests may use the same source file, a `some-test:modifier` field would still\npopulate the `source` as `some-test.css`.\n\n### expect\n\nThe location of the expected CSS file, relative to the `fixtures` directory.\nThis file is represents the expected CSS result of `source` after being passed\nthrough the PostCSS plugin.\n\n```js\n{\n  'some-test': {\n    expect: 'alterate-expect.css'\n  }\n}\n```\n\nIn that example, a `some-test` field would automatically populate the\n`expect` as `some-test.expect.css` unless it was overridden. In order that\nmultiple tests may use the same source file, a `some-test:modifier` field would\nstill populate the `source` as `some-test.css`, but alter the `expect` to be\n`some-test.modifier.expect.css`.\n\n### result\n\nThe location of the resulting CSS file, relative to the `fixtures` directory.\nThis file is the CSS result of `source` after being passed through the PostCSS\nplugin.\n\n```js\n{\n  'some-test': {\n    result: 'alterate-result.css'\n  }\n}\n```\n\nIn that example, a `some-test` field would automatically populate the\n`result` as `some-test.result.css` unless it was overridden. In order that\nmultiple tests may use the same source file, a `some-test:modifier` field would\nstill populate the `source` as `some-test.css`, but alter the `result` to be\n`some-test.modifier.result.css`.\n\n### before\n\nA function to be run before the particular test. This is helpful for generating\nvariables, content, or files that will be used by the plugin.\n\n```js\n{\n  'some-test': {\n    before: () => {\n      /* do something before the plugin runs */\n    }\n  }\n}\n```\n\n### after\n\nA function to be run after the particular test. This is helpful for cleaning up\nvariables, content, or files that were used by the plugin.\n\n```js\n{\n  'some-test': {\n    after: () => {\n      /* do something after the plugin runs */\n    }\n  }\n}\n```\n\n### plugin\n\nA plugin or array of plugins that will specifying alternative plugin\n\n```js\n{\n  'some-test': {\n    plugin: () => require('postcss')(\n      require('some-plugin-that-runs-before'),\n      require('.'),\n      require('some-plugin-that-runs-after')\n    )\n  }\n}\n```\n\n## CLI Options\n\nOptions can be passed into the `postcss-tape` function or defined in\n`package.json` using the `postcssConfig` property.\n\n### plugin\n\nThe path to the plugin being tested.\n\n```bash\npostcss-tape --plugin path/to/plugin.js\n```\n\n```json\n{\n  \"postcssConfig\": {\n    \"plugin\": \"path/to/plugin.js\"\n  }\n}\n```\n\nBy default, `plugin` is the resolved file from the current working directory.\n\n### config\n\nThe path to the configuration file used to run tests.\n\n```bash\npostcss-tape --config path/to/config.js\n```\n\n```json\n{\n  \"postcssConfig\": {\n    \"config\": \"path/to/config.js\"\n  }\n}\n```\n\nBy default, [PostCSS Tape] will try to use the file defined by `config`, or\nthe `config` directory’s `postcss-tape.config.js` or `.tape.js` file. By\ndefault, `config` is the current working directory.\n\n### fixtures\n\nThe path to the fixtures used by tests.\n\n```bash\npostcss-tape --fixtures path/to/tests\n```\n\n```json\n{\n  \"postcssConfig\": {\n    \"fixtures\": \"path/to/tests\"\n  }\n}\n```\n\n[npm-url]: https://www.npmjs.com/package/postcss-tape\n[cli-url]: https://travis-ci.org/csstools/postcss-tape\n[git-url]: https://gitter.im/postcss/postcss\n\n[PostCSS]: https://github.com/postcss/postcss\n[PostCSS Tape]: https://github.com/csstools/postcss-tape\n","publish_time":1600456368779,"_cnpm_publish_time":1600456368779,"dist-tags":{"latest":"6.0.1","rc1":"3.0.0"}}