Nostalgic Piano Music

    hashup
    TypeScript icon, indicating that this package has built-in type declarations

    0.4.2 • Public • Published

    hashup

    ℹ️ Mainly to use in conjunciton with kirby-hashed-assets.

    hashup is a tiny CLI tool with two objectives in mind for your freshly built frontend assets:

    1. Rename or rather hash (hence the name) the assets.
    2. Generate a manifest.json for them.

    Installation

    npm i hashup -D

    Usage

    Add hashup to your build pipeline by adding it your package.json scripts (recommended), for example:

    {
      "scripts": {
        "clean": "rm -rf public/assets/{css,js}",
        "build": "npm run clean && <...> && hashup"
      },
      "devDependencies": {
        "hashup": "latest"
      }
    }

    Now, pass asset paths to Kirby's asset helpers like you normally do:

    <?= js('assets/js/main.js') ?>
    // `<script src="https://example.com/assets/js/main.9ad649fd.js"></script>

    Read on here: Automatic hashing with manifest.json.

    License

    MIT License © 2021-2022 Johann Schopplich

    Install

    npm i hashup

    DownloadsWeekly Downloads

    30

    Version

    0.4.2

    License

    MIT

    Unpacked Size

    94.7 kB

    Total Files

    9

    Last publish

    Collaborators

    • johannschopplich