Skip to content

Commit becfbae

Browse files
docs(README): fix autocomplete typo madness :D
1 parent 4c2dc71 commit becfbae

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<h2 align="center">Install</h2>
1616

1717
```bash
18-
npm i -D posthtml-expressionsressions
18+
npm i -D posthtml-expressions
1919
```
2020

2121
<h2 align="center">Usage</h2>
@@ -24,14 +24,14 @@ npm i -D posthtml-expressionsressions
2424
const { readFileSync } = require('fs')
2525

2626
const posthtml = require('posthtml')
27-
const expressionsressions = require('posthtml-expressionsressions')
27+
const expressions = require('posthtml-expressions')
2828

29-
posthtml(expressionsressions({ locals: { foo: 'bar' } }))
29+
posthtml(expressions({ locals: { foo: 'bar' } }))
3030
.process(readFileSync('index.html', 'utf8'))
3131
.then((result) => console.log(result.html))
3232
```
3333

34-
This plugin provides a syntax for including local variables and expressionsressions in your templates, and also extends custom tags to act as helpers for conditionals and looping.
34+
This plugin provides a syntax for including local variables and expressions in your templates, and also extends custom tags to act as helpers for conditionals and looping.
3535

3636
You have full control over the delimiters used for injecting locals, as well as the tag names for the conditional and loop helpers, if you need them. All options that can be passed to the `expressions` plugin are shown below:
3737

@@ -41,7 +41,7 @@ You have full control over the delimiters used for injecting locals, as well as
4141
|:----:|:-----:|:----------|
4242
| **delimiters** | `['{{', '}}']` | Array containing beginning and ending delimiters for escaped locals |
4343
| **unescapeDelimiters** | `['{{{', '}}}']` | Array containing beginning and ending delimiters for unescaped locals |
44-
| **locals** | `{}` | Object containing any local variables you want to be available inside your expressionsressions |
44+
| **locals** | `{}` | Object containing any local variables you want to be available inside your expressions |
4545
| **conditionalTags** | `['if', 'elseif', 'else']` | Array containing names for tags used for `if/else if/else` statements |
4646
| **loopTags** | `['each']` | Array containing names for `for` loops |
4747
| **scopeTags** | `['scope']` | Array containing names for scopes |
@@ -96,13 +96,13 @@ In this case, your code would render as html:
9696

9797
### Expressions
9898

99-
You are not limited to just directly rendering local variables either, you can include any type of javascript expressionsression and it will be evaluated, with the result rendered. For example:
99+
You are not limited to just directly rendering local variables either, you can include any type of javascript expressions and it will be evaluated, with the result rendered. For example:
100100

101101
```html
102102
<p class="{{ env === 'production' ? 'active' : 'hidden' }}">in production!</p>
103103
```
104104

105-
With this in mind, it is strongly recommended to limit the number and complexity of expressionsressions that are run directly in your template. You can always move the logic back to your config file and provide a function to the locals object for a smoother and easier result. For example:
105+
With this in mind, it is strongly recommended to limit the number and complexity of expressions that are run directly in your template. You can always move the logic back to your config file and provide a function to the locals object for a smoother and easier result. For example:
106106

107107
```js
108108
locals: {
@@ -140,7 +140,7 @@ locals: { foo: 'foo' }
140140
<p>Foo is probably just foo in the end.</p>
141141
```
142142

143-
Anything in the `condition` attribute is evaluated directly as an expressionsression.
143+
Anything in the `condition` attribute is evaluated directly as an expressions.
144144

145145
It should be noted that this is slightly cleaner-looking if you are using the [SugarML parser](https://github.com/posthtml/sugarml). But then again so is every other part of html.
146146

@@ -189,7 +189,7 @@ locals: {
189189
<p>foo: bar</p>
190190
```
191191

192-
The value of the `loop` attribute is not a pure expressionsression evaluation, and it does have a tiny and simple custom parser. Essentially, it starts with one or more variable declarations, comma-separated, followed by the word `in`, followed by an expressionsression.
192+
The value of the `loop` attribute is not a pure expressions evaluation, and it does have a tiny and simple custom parser. Essentially, it starts with one or more variable declarations, comma-separated, followed by the word `in`, followed by an expressions.
193193

194194

195195
```html
@@ -198,7 +198,7 @@ The value of the `loop` attribute is not a pure expressionsression evaluation, a
198198
</each>
199199
```
200200

201-
So you don't need to declare all the available variables (in this case, the index is skipped), and the expressionsression after `in` doesn't need to be a local variable, it can be any expressionsression.
201+
So you don't need to declare all the available variables (in this case, the index is skipped), and the expressions after `in` doesn't need to be a local variable, it can be any expressions.
202202

203203
### Scopes
204204

0 commit comments

Comments
 (0)