Skip to content

Commit 37919fd

Browse files
authored
Merge pull request #1 from brianangulo/patch-1
Typo fixes README.md
2 parents 1b14350 + cd2c0d4 commit 37919fd

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
[![License](https://img.shields.io/badge/license-MS--RL-green)](https://opensource.org/license/ms-rl-html)
66

77
This library provides a lightweight [backend integration](https://vitejs.dev/guide/backend-integration.html)
8-
for your PHP-based MPA, SPA or PWA based on [Vite](https://vitejs.dev/).
8+
for your PHP-based MPA, SPA, or PWA based on [Vite](https://vitejs.dev/).
99

1010
It parses the [build manifest](https://vitejs.dev/config/build-options#build-manifest) (the `.vite/manifest.json` file)
1111
and produces the required `<script>` and `<link>` tags to load (and preload) scripts, CSS files, and other assets.
1212

1313
## Basic Usage
1414

1515
A commented MPA example is available [here](https://github.com/mindplay-dk/php-vite-mpa) -
16-
please refer to this for examples of configuring Vite, NPM, TypeScript and Composer.
16+
please refer to this for examples of configuring Vite, NPM, TypeScript, and Composer.
1717

1818
In the following steps, we'll cover usage of the library API only.
1919

@@ -27,13 +27,13 @@ $vite = new Manifest(
2727
);
2828
```
2929

30-
Teh `manifest_path` points to the Vite `manifest.json` file created for the production build.
30+
The `manifest_path` points to the Vite `manifest.json` file created for the production build.
3131

3232
In this example, `dev` is `false`, so we'll be creating tags for the production assets.
3333

3434
The `base_path` is relative to your public web root - it is the root folder from which Vite's production assets are served, and/or the root folder from which Vite serves assets dynamically in development mode.
3535

36-
Note that, in development mode (when `dev` set to `false`) the `manifest.json` file is unused, and not required.
36+
Note that, in development mode (when `dev` is set to `true`) the `manifest.json` file is unused, and not required.
3737

3838
> 💡 *For a detailed description of the constructor arguments, please refer to the `Manifest` constructor argument doc-blocks.*
3939
@@ -55,7 +55,7 @@ Making multiple calls for different entry points *may* result in duplicate tags
5555

5656
#### 3. Emit from `Tags` in your HTML template:
5757

58-
Your `Tags` instance contains the `preload` and `css` tags, which should be emitted in
58+
Your `Tags` instance contains the `preload` and `CSS` tags, which should be emitted in
5959
your `<head>` tag, as well as the `js` tags, which should be emitted immediately before
6060
the `</body>` end tag.
6161

@@ -105,13 +105,13 @@ Then create your tags as covered in the documentation above.
105105

106106
## Creating URLs
107107

108-
For advanced use-cases, you can also directly get the URL for an asset published by Vite:
108+
For advanced use cases, you can also directly get the URL for an asset published by Vite:
109109

110110
```php
111111
$my_url = $manifest->getURL("consent-banner.ts");
112112
```
113113

114114
You can use this feature to, for example:
115115

116-
* Create your own custom preload tags (e.g. with media-queries)
116+
* Create your own custom preload tags (e.g. with media queries)
117117
* Conditionally load a script based on user interactions or user state, etc.

0 commit comments

Comments
 (0)