Skip to content

Commit d1a4d7e

Browse files
committed
docs: update markdown files
1 parent a3c06aa commit d1a4d7e

File tree

3 files changed

+36
-35
lines changed

3 files changed

+36
-35
lines changed

docs/src/markdown/docs/main/core/commands.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ seoTitle: Create commands
66
seoDesc: somedat
77
---
88

9-
Command is a core part of lesy. You can create and add commands in multiple ways. Lets see what you can actually do with commands.
9+
Command is the core part of Lesy. You can create and add commands in multiple ways. Let's see what you can actually do with commands.
1010

1111
- Execute synchronous and asynchronous code
1212
- Run multi-level sub commands
13-
- Run another command programatically
13+
- Run another command programmatically
1414
- Parse and validate arguments and flags
1515
- Use features and utils from app or plugins
1616

@@ -210,7 +210,7 @@ $ node bin/cmd generate component
210210

211211
#### usage
212212

213-
Sample usage code shown in the help command
213+
The sample usage code is shown in the help command
214214

215215
### Run context
216216

@@ -255,7 +255,7 @@ todo
255255

256256
### Sub commands
257257

258-
Commands can be nested multiple levels. If you want to make a sub-command, just add the parent name in `main` property. Other features of the command remains same for sub commands.
258+
Commands can be nested multiple levels. If you want to make a sub-command, just add the parent name in `main` property. Other features of the command remain same for sub commands.
259259

260260
```typescript
261261
// parent command
@@ -305,7 +305,7 @@ Please dont use parent name aliases
305305

306306
### Default command
307307

308-
By default **lesy** looks for command named `default` if no args supplied in the input. If you would like to run different command as a default command, set it in the config.
308+
By default **lesy** looks for the command named `default` if no args supplied in the input. If you would like to run a different command as a default command, set it in the config.
309309

310310
```typescript
311311
{

docs/src/markdown/docs/main/get-started/overview.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ path: /docs/get-started/overview
44
icon: user-smile-fill
55
---
66

7-
Lesy is just a simple lightweight CLI framework helps you to build modern and performant command line apps. Thats all!
7+
Lesy is a **lightweight CLI framework** built with Node JS, which helps you to build modern and performant command-line apps.
88

9-
Whether you are building a dead simple app or more advanced app, Lesy lets you to write less code and get more. Here's the sample code for classic Hello world example.
9+
Whether you are building a dead-simple or a complex app, Lesy lets you write less code and get more. Here's the sample code for the classic Hello world example.
1010

1111
```js
1212
#!/usr/bin/env node
@@ -20,8 +20,8 @@ lesy({ commands }).parse();
2020
### Why Lesy?
2121

2222
- **Language**: Full support for Typescript with @types
23-
- **Flexibility**: Able to change complete behaviour with middlewares
24-
- **Boilerplate**: Write less code. whether its a dead simple project or complex one.
23+
- **Flexibility**: Able to change complete behavior with middlewares
24+
- **Boilerplate**: Write less code.
2525
- **Extensions**: Add cool functionalities with plugins
2626
- **Platform**: Write once and run in CLI or UI
2727
- **Performance**: It is just faster than existing libraries. Benchmark inside.
@@ -36,8 +36,8 @@ We have setup a _playground_ for you to play around with it.
3636

3737
### What is the meaning of Lesy?
3838

39-
Well, there is no specific meaning for Lesy. The whole project is build with the mindset of simple and easy. Whether it is a code or documentation or name or logo, everything should be simple. **Lesy** sounds cool and short.
39+
Well, there is no specific meaning for Lesy. The whole project is built with the mindset of simplicity and maintainability. Thus each part of the project right from the name to code, everything is crafted carefully. **Lesy** sounds cool and short.
4040

41-
Same way, it is not related to penguin logo. Penguin is cute right? Lets make that as a logo and name it Lesy!!
41+
Same way, it is not related to the penguin. I just felt Penguin is cute and so made it as a logo.
4242

43-
Give it a try, you will like Lesy!
43+
Give it a try. You will like Lesy!

docs/src/markdown/docs/plugins/docs/generator.md

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,13 @@ export default {
3030
```typescript
3131
export default {
3232
name: "generate",
33-
run: async ({ features: { generator } }) => {
34-
await generator().create({
35-
destination: `${process.cwd}/projects/`,
33+
run: async ({ feature: { generateFiles } }) => {
34+
await generateFiles({
3635
source: `${__dirname}/templates`,
36+
destination: `${process.cwd}/projects/`,
3737
data: {
38-
name: "John",
38+
filename: "welcome",
39+
name: "Scooby Doo",
3940
},
4041
});
4142
},
@@ -45,7 +46,7 @@ export default {
4546
#### Step 2: Create source templates
4647

4748
```html
48-
<!-- path/to/templates/welcome.html -->
49+
<!-- path/to/templates/{{filename}}.html -->
4950
<h1>Hello {{name}}</h1>
5051
```
5152

@@ -59,41 +60,41 @@ This command will create a files in the destination folder. And the output file
5960

6061
```html
6162
<!-- path/to/estination/welcome.html -->
62-
<h1>Hello John</h1>
63+
<h1>Hello Scooby Doo</h1>
6364
```
6465

6566
### Options
6667

67-
Once the plugin is installed and added to index file, we can access the `generator` function from the `features`. It has only one method called `create`, which accepts the following options.
68+
Once the plugin is installed and added to the index file, we can access the `generator` function from the `feature` property. It has only one method named `create`, which accepts the following options.
6869

6970
#### source
7071

71-
The source path for the templates. Should be a absolute path.
72+
The source path for the templates. Should be an absolute path.
7273

7374
#### destination
7475

75-
The destination path for the compiled files.Should be a absolute path.
76+
The destination path for the compiled files.Should be an absolute path.
7677

7778
#### data
7879

79-
We can pass the dynamic data to the templates using `data` option. It is a plain object. All the keys will be replaced with the value in the template files.
80+
We can pass the dynamic data to the templates using the `data` option. It is a plain object. All the keys will be replaced with the values in the template files.
81+
82+
#### handlebarsInstance
83+
84+
If you wish to register any handlebars helpers or partials, you can get the instance from this function property.
85+
86+
#### handebarsOptions
87+
88+
You can pass handlebars options using this property.
8089

8190
### Templating
8291

83-
Templates are parsed using [Handlebars](https://handlebarsjs.com/guide/). This plugin comes with a build-in case change helper. In the template we can use,
92+
Templates are parsed using [Handlebars](https://handlebarsjs.com/guide/). This plugin comes with a built-in case helper. In the template we can use,
8493

8594
```html
86-
<h1>Hello {{name|uppercase}}</h1>
95+
<h1>Hello {{uppercase name}}</h1>
8796
```
8897

89-
supports
90-
91-
- uppercase
92-
- lowercase
93-
- capitalcase
94-
- snakecase
95-
- pascalcase
96-
- camelcase
97-
- headercase
98-
- constantcase
99-
- titlecase
98+
supported helpers:
99+
100+
** uppercase** &middot; ** lowercase** &middot; ** capitalcase** &middot; ** snakecase** &middot; ** pascalcase** &middot; ** camelcase** &middot; ** headercase** &middot; ** constantcase** &middot; ** titlecase**

0 commit comments

Comments
 (0)