hanami-assets 2.1.0.beta2 → 2.1.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +2 -0
- data/README.md +7 -7
- data/lib/hanami/assets/config.rb +1 -9
- data/lib/hanami/assets/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c63f686712b26848bd0d228c8d16a17ff9c38096360dcd86b901fe9db7acde91
|
4
|
+
data.tar.gz: f85ca3433bcec2d6003c770924e5f9d01713a8e35c5b5af13e93bc8c0741645b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 270ec0aad2e026303ffaa9e52d0d218b3cd1566e07d698dd6787eed98fc99d9526e81829f9e719594926f659956191cb7a323f6f21e897016d54b5e8b4f7a5b2
|
7
|
+
data.tar.gz: aa83f4b50a3c763d7b3f3ec6e0817e9a0bcdc60ab5206cc856e02465394b6eb270f568dc38bba0a095897343979258aa04c94a0122eb92e9c681759b52b690ee
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -118,9 +118,9 @@ Among other directories, it generates a specific structure for assets:
|
|
118
118
|
$ tree app/assets
|
119
119
|
├── images
|
120
120
|
│ └── favicon.ico
|
121
|
-
├──
|
121
|
+
├── js
|
122
122
|
│ └── app.ts
|
123
|
-
└──
|
123
|
+
└── css
|
124
124
|
└── app.css
|
125
125
|
```
|
126
126
|
|
@@ -135,16 +135,16 @@ This process includes any kind of asset: other JavaScript files, stylesheets, im
|
|
135
135
|
|
136
136
|
The default entry points are:
|
137
137
|
|
138
|
-
* `app/assets/
|
139
|
-
* `slices/[slice-name]/assets/
|
138
|
+
* `app/assets/js/app.ts`
|
139
|
+
* `slices/[slice-name]/assets/js/app.ts`
|
140
140
|
|
141
141
|
You can specify custom Entry Points, by adding an `app.{js,ts,mjs,mts,tsx,jsx}` file into the assets directory of the app or a slice.
|
142
142
|
|
143
|
-
An example is: `app/assets/
|
143
|
+
An example is: `app/assets/js/login/app.ts` to define a new Entry Point for a Login page where you want to have a more lightweight bundle.
|
144
144
|
|
145
145
|
#### Static Assets
|
146
146
|
|
147
|
-
Except for `
|
147
|
+
Except for `js` and `css` directories, all the other directories are considered **static**.
|
148
148
|
Their files will be copied as they are to the destination directory.
|
149
149
|
|
150
150
|
If you have a custom directory `app/assets/fonts`, all the fonts are copied to the destination direcotry.
|
@@ -176,7 +176,7 @@ By doing so, you can safely cache and deliver updated versions of assets to clie
|
|
176
176
|
|
177
177
|
During the deployment process, Hanami Assets appends to the file name a unique hash.
|
178
178
|
|
179
|
-
Example: `app/assets/
|
179
|
+
Example: `app/assets/js/app.ts` -> `public/assets/app-QECGTTYG.js`
|
180
180
|
|
181
181
|
It creates a `/public/assets.json` to map the original asset name to the fingerprint name.
|
182
182
|
|
data/lib/hanami/assets/config.rb
CHANGED
@@ -18,15 +18,7 @@ module Hanami
|
|
18
18
|
|
19
19
|
# @since 2.1.0
|
20
20
|
# @api private
|
21
|
-
setting :
|
22
|
-
|
23
|
-
# @since 2.1.0
|
24
|
-
# @api private
|
25
|
-
setting :package_manager_command, default: "exec"
|
26
|
-
|
27
|
-
# @since 2.1.0
|
28
|
-
# @api private
|
29
|
-
setting :executable, default: "hanami-assets"
|
21
|
+
setting :package_manager_run_command, default: "npm run --silent"
|
30
22
|
|
31
23
|
# @since 2.1.0
|
32
24
|
# @api private
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hanami-assets
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.0.
|
4
|
+
version: 2.1.0.rc1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Luca Guidi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-11-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: zeitwerk
|