Skip to content

Commit 47baef4

Browse files
change examples from hbs to es6
1 parent 4b72d04 commit 47baef4

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

website/docs/building/template-system.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ For example a component of type: `oc-template-handlebars` will need a compiler n
2121
"oc": {
2222
"files": {
2323
"template": {
24-
"src": "template.hbs",
25-
"type": "oc-template-handlebars"
24+
"src": "src/view.ts",
25+
"type": "oc-template-es6"
2626
}
2727
}
2828
},
2929
"devDependencies": {
30-
"oc-template-handlebars-compiler": "6.0.8"
30+
"oc-template-es6-compiler": "6.0.0"
3131
},
3232
...
3333
```

website/docs/components/getting-started.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,15 @@ The basic component directory is composed by the following files:
4646
```
4747
├── hello-world/
4848
├── package.json
49-
├── template.hbs
50-
├── server.js
51-
├── img/
49+
├── src/view.ts
50+
├── src/server.ts
51+
├── public/
5252
├── logo.png
5353
```
5454

5555
- `package.json` contains the component definition, dependencies, and [more](#structure-of-the-package)
56-
- `template.hbs` is a [template](#template) containing the markup
57-
- `server.js` is an optional [file](#basic-server), needed when the component has some logic
56+
- `view.ts` is a [template](#template) containing the markup
57+
- `server.ts` is an optional [file](#basic-server), needed when the component has some logic
5858

5959
Additionally the component can have static contents such as images, js, and files that will be referenced in the html markup and any other files that will be useful for the development such as tests, docs, etc.
6060

@@ -64,16 +64,16 @@ The basic package file `package.json` looks as follows:
6464

6565
```json
6666
{
67-
"name": "base-component-handlebars",
67+
"name": "base-component-es6",
6868
"description": "",
6969
"version": "1.0.0",
7070
"oc": {
7171
"files": {
7272
"data": "server.js",
7373
"static": ["img"],
7474
"template": {
75-
"src": "template.hbs",
76-
"type": "oc-template-handlebars"
75+
"src": "src/view.ts",
76+
"type": "oc-template-es6"
7777
}
7878
},
7979
"parameters": {

website/docs/quick-start-tutorial.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,19 +71,19 @@ This creates a new directory with the following structure:
7171
```
7272
hello-world/
7373
├── package.json # Component configuration
74-
├── template.js # ES6 template (the view)
75-
├── server.js # Server-side logic (optional)
76-
└── img/
74+
├── src/view.ts # ES6 template (the view)
75+
├── src/server.js # Server-side logic (optional)
76+
└── public/
7777
└── logo.png # Static assets
7878
```
7979

8080
### Understanding the Files
8181

8282
**package.json**: Contains component metadata, dependencies, and OpenComponents-specific configuration.
8383

84-
**template.js**: The ES6 template that defines how your component looks using modern JavaScript.
84+
**template.ts**: The ES6 template that defines how your component looks using modern JavaScript.
8585

86-
**server.js**: Optional file for server-side logic, data fetching, or API calls.
86+
**server.ts**: Optional file for server-side logic, data fetching, or API calls.
8787

8888
### Template Options
8989

0 commit comments

Comments
 (0)