@rettangoli/fe 0.0.7-rc10 → 0.0.7-rc11

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.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/cli/build.js +7 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rettangoli/fe",
3
- "version": "0.0.7-rc10",
3
+ "version": "0.0.7-rc11",
4
4
  "description": "Frontend framework for building reactive web components",
5
5
  "type": "module",
6
6
  "main": "./src/index.js",
@@ -29,7 +29,7 @@
29
29
  "dependencies": {
30
30
  "esbuild": "^0.25.5",
31
31
  "immer": "^10.1.1",
32
- "jempl": "0.1.2-rc2",
32
+ "jempl": "0.1.2-rc3",
33
33
  "js-yaml": "^4.1.0",
34
34
  "rxjs": "^7.8.2",
35
35
  "snabbdom": "^3.6.2",
package/src/cli/build.js CHANGED
@@ -18,7 +18,7 @@ function capitalize(word) {
18
18
  // Function to process view files - loads YAML and creates temporary JS file
19
19
  export const writeViewFile = (view, category, component) => {
20
20
  // const { category, component } = extractCategoryAndComponent(filePath);
21
-
21
+
22
22
  const dir = `./.temp/${category}`;
23
23
  if (!existsSync(dir)) {
24
24
  mkdirSync(dir, { recursive: true });
@@ -93,7 +93,12 @@ const buildRettangoliFrontend = async (options) => {
93
93
  count++;
94
94
  } else if (["view"].includes(fileType)) {
95
95
  const view = loadYaml(readFileSync(filePath, "utf8"));
96
- view.template = parse(view.template);
96
+ try {
97
+ view.template = parse(view.template);
98
+ } catch (error) {
99
+ console.error(`Error parsing template in file: ${filePath}`);
100
+ throw error;
101
+ }
97
102
  writeViewFile(view, category, component);
98
103
  output += `import ${component}${capitalize(
99
104
  fileType,