V2.2: Assets


hanami assets compile

Compiles the app’s assets into bundles for use in production:

$ bundle exec hanami assets compile
[bookshelf]
[bookshelf]   public/assets/app-SQ36TYM4.js       53b
[bookshelf]   public/assets/app-KUHJPSX7.css      45b
[bookshelf]   public/assets/app-KUHJPSX7.css.map  93b
[bookshelf]   public/assets/app-SQ36TYM4.js.map   93b
[bookshelf]
[bookshelf] ⚡ Done in 3ms

hanami assets watch

Watches for changes to your assets and compiles the relevant files immediately. This is a long-running command, and is run by hanami dev by default.

$ bundle exec hanami assets watch
[bookshelf] [watch] build finished, watching for changes...
[bookshelf] [watch] build started (change: "app/assets/js/app.js")
[bookshelf] [watch] build finished
[bookshelf] [watch] build started (change: "app/assets/css/app.css")
[bookshelf] [watch] build finished