nuxed / asset
Nuxed Asset
Installs: 29
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 3
Forks: 0
Open Issues: 0
Language:Hack
Requires
- hhvm: ~4.83.1 || ~4.84.0
- hhvm/hsl: ^4.41
- nuxed/filesystem: ^2.0
- nuxed/json: ^2.0
Requires (Dev)
- facebook/difflib: ^1.1.1
- facebook/fbexpect: ^2.7.7
- facebook/hh-clilib: ^2.5.2
- hhvm/hacktest: ^2.0
- hhvm/hhast: ^4.82.2
- hhvm/hhvm-autoload: ^3.1.6
- hhvm/type-assert: ^4.1.2
This package is auto-updated.
Last update: 2024-12-22 11:02:18 UTC
README
Nuxed Asset
The Nuxed Asset component manages URL generation and versioning of web assets such as CSS stylesheets, JavaScript files and image files.
Installation
This package can be installed with Composer.
$ composer require nuxed/asset
Example
use namespace Nuxed\Asset; use namespace Nuxed\Asset\VersionStrategy; <<__EntryPoint>> async function main(): Awaitable<void> { // For example, the manifest file might look like this: // { // "main.js": "main.abc123.js", // "css/styles.css": "css/styles.555abc.css" // } $versionStrategy = new VersionStrategy\JsonManifestVersionStrategy('/path/to/manifest.json'); $cdns = vec[ 'https://asset-s1.example.com/', 'https://asset-s2.example.com/', ]; $package = new Asset\UrlPackage($cdns, $versionStrategy); // https://asset-s2.example.com/css/styles.555abc.css echo await $package->getUrl('css/styles.css'); }
Security
For information on reporting security vulnerabilities in Nuxed, see SECURITY.md.
License
Nuxed is open-sourced software licensed under the MIT-licensed.