hofmannsven/laravel-modernizr-command

Laravel artisan console command to generate custom Modernizr builds.

0.6.4 2021-07-01 14:48 UTC

README

Latest Version on Packagist Build Status GitHub license

Laravel artisan command to generate custom Modernizr builds.

Modernizr is a JavaScript library that detects HTML5 and CSS3 features in the user's browser.

Installation

You can install the package via Composer:

composer require --dev hofmannsven/laravel-modernizr-command

Install Modernizr

Require Modernizr as a dependency in your package.json file:

npm i modernizr --save

Publish the config files

Publish both package config files (config.php and modernizr.json):

php artisan vendor:publish --provider="Hofmannsven\Modernizr\ModernizrServiceProvider"

Customize the config files

Example modernizr.json config file for SVG feature detection:

{
  "feature-detects": [
    "svg",
    "svg/asimg",
    "svg/clippaths",
    "svg/filters",
    "svg/foreignobject",
    "svg/inline",
    "svg/smil"
  ]
}

See Modernizr's config-all.json file for all detectable features.

Usage

Generate your custom Modernizr build based on your config.php and modernizr.json config files:

php artisan modernizr:generate

Testing

composer test

Changelog

Please read the changelog for more information about what has changed recently.

Contributing

Please read the contribution guidelines for details.

Support

Always feel free to raise an issue on GitHub.

Security

If you discover a security issue, please contact me directly. My GPG fingerprint/key is available on Keybase.

Credits

License

MIT License (MIT). Please read the license for more information.