Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/mq4-hover-shim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Rebert <code@rebertia.com>2015-01-03 10:51:34 +0300
committerChris Rebert <code@rebertia.com>2015-01-03 11:15:03 +0300
commit9ffc34ea5c5e3a3db8af1b357a3b71594e0c9c51 (patch)
tree6bc02a0f761385b07b3ca5ed29dede416ac1cf0d /README.md
parente167f0dd1cfc8710d9d07cb69a083d97b85b1f02 (diff)
Make npm module expose paths to client-side files; fixes #1
Diffstat (limited to 'README.md')
-rw-r--r--README.md9
1 files changed, 7 insertions, 2 deletions
diff --git a/README.md b/README.md
index 0cc5509..09dc745 100644
--- a/README.md
+++ b/README.md
@@ -88,8 +88,13 @@ Unofficially supported:
* Internet Explorer Mobile <=10 - ??? (Theoretically: True negative)
## API
-### CSS postprocessor
-The module itself is a [PostCSS](https://github.com/postcss/postcss) processor object (that was returned from a call to the `postcss()` function). It requires that a `hoverSelectorPrefix` string option be provided. This string will be prepended to all selectors within `@media (hover: hover) {...}` blocks within the source CSS. It transforms the source CSS as described above.
+### Node.js module; CSS postprocessor
+The npm module has the following properties:
+* `postprocessor` - CSS postprocessor that transforms the source CSS as described above. A [PostCSS](https://github.com/postcss/postcss) processor object (that was returned from a call to the `postcss()` function). It requires that a `hoverSelectorPrefix` string option be provided; this string will be prepended to all selectors within `@media (hover: hover) {...}` blocks within the source CSS.
+* `featureDetector` - Each of this object's properties is a string filepath to a JavaScript file containing the browser-side feature detector in a particular JavaScript module format.
+ * `es6` - [ECMAScript 6 module](http://www.2ality.com/2014/09/es6-modules-final.html) format (this is the original from which the other versions are generated)
+ * `cjs` - [CommonJS](http://wiki.commonjs.org/wiki/Modules/1.1) module format
+ * `umdGlobal` - "enhanced" [UMD](https://github.com/umdjs/umd) module format; exports a `window.mq4HoverShim` global if the JS environment has no module system (e.g. if included directly via `<script>` in current browsers); (generated via Browserify's `standalone` option)
### Browser-side feature detector
When used in a non-AMD non-CommonJS context, the module exports itself as a `mq4HoverShim` property on the global `window` object.