@travetto/scaffold 5.0.0-rc.3 → 5.0.0-rc.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@travetto/scaffold",
|
|
3
|
-
"version": "5.0.0-rc.
|
|
3
|
+
"version": "5.0.0-rc.4",
|
|
4
4
|
"description": "App Scaffold for the Travetto framework",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"generator",
|
|
@@ -27,14 +27,14 @@
|
|
|
27
27
|
"trv-scaffold": "./bin/trv-scaffold.js"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@travetto/runtime": "^5.0.0-rc.
|
|
31
|
-
"@travetto/cli": "^5.0.0-rc.
|
|
30
|
+
"@travetto/runtime": "^5.0.0-rc.4",
|
|
31
|
+
"@travetto/cli": "^5.0.0-rc.4",
|
|
32
32
|
"enquirer": "^2.4.1",
|
|
33
33
|
"mustache": "^4.2.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@types/mustache": "^4.2.5",
|
|
37
|
-
"@travetto/model": "^5.0.0-rc.
|
|
37
|
+
"@travetto/model": "^5.0.0-rc.4"
|
|
38
38
|
},
|
|
39
39
|
"travetto": {
|
|
40
40
|
"displayName": "App Scaffold"
|
|
@@ -5,7 +5,7 @@ export class Todo implements ModelType {
|
|
|
5
5
|
id: string;
|
|
6
6
|
text: string;
|
|
7
7
|
completed?: boolean;
|
|
8
|
-
// {{#modules.auth_rest}}
|
|
9
|
-
userId?: string;
|
|
10
|
-
// {{/modules.auth_rest}}
|
|
8
|
+
// {{#modules.auth_rest}}
|
|
9
|
+
userId?: string;
|
|
10
|
+
// {{/modules.auth_rest}}
|
|
11
11
|
}
|
package/support/bin/context.ts
CHANGED
|
@@ -139,10 +139,9 @@ export class Context {
|
|
|
139
139
|
.replaceAll('_$', '}}}'),
|
|
140
140
|
this.templateContext(),
|
|
141
141
|
)
|
|
142
|
-
.replace(
|
|
143
|
-
.replace(/
|
|
144
|
-
.replace(
|
|
145
|
-
.replace(/^\s*(\/\/\s*)\n/gsm, '');
|
|
142
|
+
.replace(/[ ]*[/][/][ ]*@ts-expect-error[^\n]*\n/gsm, '') // Excluding errors
|
|
143
|
+
.replace(/^[ ]*[/][/][ ]*[{][{][^\n]*\n/gsm, '') // Excluding conditional comments, full-line
|
|
144
|
+
.replace(/[ ]*[/][/][ ]*[{][{][^\n]*/gsm, ''); // Excluding conditional comments
|
|
146
145
|
await fs.mkdir(path.dirname(out), { recursive: true });
|
|
147
146
|
await fs.writeFile(out, rendered, 'utf8');
|
|
148
147
|
}
|