0.4.6 • Published 11 days ago

hashup v0.4.6

Weekly downloads
-
License
MIT
Repository
github
Last release
11 days ago

hashup

!TIP Mainly to use in conjunction 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

If you want to use hashup right away, there is no need to install it. Simply call it with npx:

npx -y hashup

Otherwise, add it to your development dependencies with either npm, pnpm or your package manager of choice:

# pnpm
pnpm add -D hashup

# npm
npm i -D hashup

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-PRESENT Johann Schopplich

0.4.5

11 days ago

0.4.6

11 days ago

0.4.4

1 year ago

0.4.3

1 year ago

0.4.1

2 years ago

0.4.2

2 years ago

0.3.2

2 years ago

0.3.1

2 years ago

0.3.0

2 years ago

0.2.4

2 years ago

0.2.3

2 years ago

0.2.2

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago