hofmannsven / laravel-modernizr-command
Laravel artisan console command to generate custom Modernizr builds.
Installs: 292
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 1
Open Issues: 1
pkg:composer/hofmannsven/laravel-modernizr-command
Requires
- php: ^7.3
- illuminate/support: ~5.8.0|^6.0|^7.0|^8.0
- symfony/process: ^4.2|^5.0
Requires (Dev)
- orchestra/testbench: ~3.8.0|^4.0|^5.0|^6.0
- phpunit/phpunit: ^9.3
README
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.