fela-plugin-validator
Advanced tools
Comparing version 3.0.1 to 3.0.2
{ | ||
"name": "fela-plugin-validator", | ||
"version": "3.0.1", | ||
"version": "3.0.2", | ||
"description": "Fela plugin to validate style objects", | ||
@@ -23,4 +23,4 @@ "main": "index.js", | ||
"peerDependencies": { | ||
"fela": "3.0.1" | ||
"fela": "3.0.2" | ||
} | ||
} |
@@ -18,7 +18,42 @@ # fela-plugin-validator | ||
<!-- Fela (Development): Unminified version including all warnings --> | ||
<script src="https://unpkg.com/fela-plugin-validator@3.0.1/dist/fela-plugin-validator.js"></script> | ||
<script src="https://unpkg.com/fela-plugin-validator@3.0.2/dist/fela-plugin-validator.js"></script> | ||
<!-- Fela (Production): Minified version --> | ||
<script src="https://unpkg.com/fela-plugin-validator@3.0.1/dist/fela-plugin-validator.min.js"></script> | ||
<script src="https://unpkg.com/fela-plugin-validator@3.0.2/dist/fela-plugin-validator.min.js"></script> | ||
``` | ||
## Usage | ||
Make sure to read the documentation on [how to use plugins](http://fela.js.org/docs/advanced/Plugins.html). | ||
```javascript | ||
import { createRenderer } from 'fela' | ||
import unit from 'fela-plugin-validator' | ||
const renderer = createRenderer({ | ||
plugins: [ validator() ] | ||
}) | ||
``` | ||
### Configuration | ||
##### Options | ||
| Option | Value | Default | Description | | ||
| --- | --- | --- | --- | | ||
| `logInvalid` | *(boolean)* | `true` | logs invalid properties/values | | ||
| `deleteInvalid` | *(boolean)* | `false` | deletes invalid properties/values | | ||
##### Example | ||
```javascript | ||
import { createRenderer } from 'fela' | ||
import validator from 'fela-plugin-validator' | ||
const validatorPlugin = validator({ | ||
logInvalid: true, | ||
deleteInvalid: true | ||
}) | ||
const renderer = createRenderer({ | ||
plugins: [ validatorPlugin ] | ||
}) | ||
``` | ||
## Example | ||
@@ -75,19 +110,4 @@ If the `deleteInvalid` option is enabled. | ||
``` | ||
## Configuration | ||
The validator plugin uses two different option flags to enable/disable features. | ||
```javascript | ||
import validator from 'fela-plugin-validator' | ||
const plugin = validator({ | ||
// Will log invalid properties as well as | ||
// the value assigned to, default: true | ||
logInvalid: true, | ||
// Will automatically delete invalid | ||
// properties, default: false | ||
deleteInvalid: true | ||
}) | ||
``` | ||
## License | ||
@@ -94,0 +114,0 @@ Fela is licensed under the [MIT License](http://opensource.org/licenses/MIT).<br> |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14574
115