Comparing version 1.0.5 to 1.0.6
{ | ||
"name": "inprint", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"private": false, | ||
@@ -5,0 +5,0 @@ "description": "A very simple precompiler written in typescript. With it you can make a dynamically generated blocks in your code.", |
@@ -19,3 +19,3 @@ # inprint | ||
Anywhere in your code add a block you want to generate like this | ||
1. Anywhere in your code add a block you want to generate like this | ||
@@ -30,3 +30,3 @@ ```javascript | ||
Now add **inprint.cjs** (or **.js**) to your project with the following contents: | ||
2. Now add **inprint.cjs** (or **.js**) to your project with the following contents: | ||
@@ -42,4 +42,16 @@ ```javascript | ||
The returned content will be inprinted between **@INPRINT** tags. | ||
3. Run **inprint** | ||
4. The returned content will be inprinted between **@INPRINT** tags: | ||
```javascript | ||
console.log("any code can be here"); | ||
// @INPRINT_START {my:"own params", json5:'is supported here!'} | ||
// {my:"own params", json5:'is supported here!'} | ||
// @INPRINT_END | ||
console.log("any code can be here"); | ||
``` | ||
# Details | ||
inprint function will receive the following additional paramaters: | ||
@@ -46,0 +58,0 @@ |
28305
67