mirror of
https://github.com/lucaspalomodevelop/JSSTE.git
synced 2026-03-13 07:19:37 +00:00
create examples | create tests | fix jsonmerger | fix imports
This commit is contained in:
commit
112504233d
17
README.md
17
README.md
@ -40,7 +40,6 @@ jsste.render(pagecode, tempaltecode);
|
||||
|
||||
#### Example
|
||||
|
||||
|
||||
```javascript
|
||||
const templatecode = `
|
||||
<html>
|
||||
@ -54,7 +53,7 @@ const templatecode = `
|
||||
</html>
|
||||
`;
|
||||
|
||||
const pagecode = {"VARNAME1":"Hello World", "VARNAME2":"This is a test"};
|
||||
const pagecode = { VARNAME1: "Hello World", VARNAME2: "This is a test" };
|
||||
|
||||
let result = Jsste.render(pagecode, templatecode);
|
||||
|
||||
@ -68,18 +67,15 @@ let result = Jsste.render(pagecode, templatecode);
|
||||
// <p>This is a test</p>
|
||||
// </body>
|
||||
// </html>
|
||||
|
||||
```
|
||||
|
||||
### Special Variables
|
||||
### Special Variables
|
||||
|
||||
- `_TEMPLATE_` -> Defines the path to the temp file
|
||||
- `_STYLES_` -> Defines a list of CSS files that will be implemented
|
||||
|
||||
|
||||
#### Example
|
||||
|
||||
|
||||
```javascript
|
||||
const templatecode = `
|
||||
<html>
|
||||
@ -101,8 +97,8 @@ let result = Jsste.render(pagecode, templatecode);
|
||||
// <html>
|
||||
// <head>
|
||||
// <title>JSSTE Example</title>
|
||||
// <link rel="stylesheet" href="./main">
|
||||
// <link rel="stylesheet" href="./othercss">
|
||||
// <link rel="stylesheet" href="./main.css">
|
||||
// <link rel="stylesheet" href="./othercss.css">
|
||||
// </head>
|
||||
// <body>
|
||||
// <h1>Hello World</h1>
|
||||
@ -110,7 +106,4 @@ let result = Jsste.render(pagecode, templatecode);
|
||||
// </body>
|
||||
// </html>
|
||||
|
||||
|
||||
|
||||
|
||||
```
|
||||
```
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user