You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+12-6Lines changed: 12 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,8 @@ dependencies:
35
35
36
36
3. Run `yarn add -D vite vite-plugin-lucky` to install Vite and the plugin for Lucky
37
37
38
-
**Note**: Look at [vite-plugin-lucky](https://github.com/wout/vite-plugin-lucky) for more info about the plugin.
38
+
> [!Note]
39
+
> Look at [vite-plugin-lucky](https://github.com/wout/vite-plugin-lucky) for more info about the plugin.
39
40
40
41
## Setup
41
42
@@ -50,7 +51,8 @@ Run **`bin/lucky_vite init`** to create the following files:
50
51
- `src/js/entry/main.js`: the first entry point with a basic setup
51
52
- `src/css/main.css`: an empty stylesheet which is referenced by `main.js`
52
53
53
-
**Note**: The initializer accepts a name option for the entry script: `bin/lucky_vite init --name=app`.
54
+
> [!Note]
55
+
> The initializer accepts a name option for the entry script: `bin/lucky_vite init --name=app`.
54
56
55
57
### 2. Load the Vite manifest
56
58
@@ -61,7 +63,8 @@ Replace the `Lucky::AssetHelpers.load_manifest` line in `src/app.cr` with:
61
63
+LuckyVite::AssetHelpers.load_manifest
62
64
```
63
65
64
-
**Note**: The `load_manifest` macro optionally takes a path to the `lucky_vite.json` config.
66
+
> [!Note]
67
+
> The `load_manifest` macro optionally takes a path to the `lucky_vite.json` config.
65
68
66
69
### 3. Register the Vite processes
67
70
@@ -162,7 +165,8 @@ vite_css_links "main.js"
162
165
163
166
Together they do the exact same thing as `vite_entry_tags`.
164
167
165
-
**Note**: the `vite_css_links` macro takes the main JS entry point as an argument, because that's where the CSS is imported. This macro will only generate output in production.
168
+
> [!Note]
169
+
> The `vite_css_links` macro takes the main JS entry point as an argument, because that's where the CSS is imported. This macro will only generate output in production.
166
170
167
171
#### Full control
168
172
@@ -194,7 +198,8 @@ LuckyVite manages the asset pipeline by overwriting Lucky's `asset` and `dynamic
194
198
img src: asset("@images/logo.png")
195
199
```
196
200
197
-
**Note**: The asset helper uses Vite's aliases for easier referencing. Aliases can be configured in `config/lucky_vite.json`.
201
+
> [!Note]
202
+
> The asset helper uses Vite's aliases for easier referencing. Aliases can be configured in `config/lucky_vite.json`.
198
203
199
204
## Configuration
200
205
@@ -233,7 +238,8 @@ Here's a bit more info about the available properties:
233
238
- **`origin`** (_`string`_): alternative to using `https`, `host` and `port`
234
239
- _example_: `"http://localhost:3210"`
235
240
236
-
**Note**: Not all Vite's configuration options are recognised here as this file covers that's shared between Vite and Lucky. You can add other Vite-specific configuration options directly in `vite.config.js`.
241
+
> [!Note]
242
+
> Not all Vite's configuration options are recognised here as this file covers that's shared between Vite and Lucky. You can add other Vite-specific configuration options directly in `vite.config.js`.
0 commit comments