arcanajs 2.0.0 → 2.0.2

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 ADDED
@@ -0,0 +1,17 @@
1
+ # ArcanaJS Framework
2
+
3
+ ArcanaJS is a modern React framework for building server-side rendered (SSR) applications with ease. It combines the power of Express, React, and TypeScript to provide a seamless development experience.
4
+
5
+ ## Features
6
+
7
+ - **Server-Side Rendering (SSR):** Fast initial load times and SEO-friendly pages.
8
+ - **TypeScript Support:** Built with TypeScript for type safety and better developer experience.
9
+ - **File-based Routing:** Intuitive routing based on your file structure.
10
+ - **Hot Module Replacement (HMR):** Fast development cycle with instant updates.
11
+ - **Tailwind CSS:** Integrated support for utility-first CSS.
12
+
13
+
14
+
15
+ ## License
16
+
17
+ MIT
@@ -99,9 +99,12 @@ class ArcanaJSServer {
99
99
  if (stat.isDirectory()) {
100
100
  traverse(fullPath);
101
101
  }
102
- else if (file.endsWith(".tsx") || file.endsWith(".jsx")) {
102
+ else if (file.endsWith(".tsx") ||
103
+ file.endsWith(".jsx") ||
104
+ file.endsWith(".js") ||
105
+ file.endsWith(".ts")) {
103
106
  const relativePath = path_1.default.relative(viewsDir, fullPath);
104
- const viewName = relativePath.replace(/\.(tsx|jsx)$/, "");
107
+ const viewName = relativePath.replace(/\.(tsx|jsx|js|ts)$/, "");
105
108
  try {
106
109
  // Use __non_webpack_require__ if available to avoid Webpack bundling issues
107
110
  // or standard require if running in Node directly
@@ -115,7 +118,7 @@ class ArcanaJSServer {
115
118
  requireFunc("ts-node/register");
116
119
  }
117
120
  catch (e) {
118
- // Ignore if already registered or not found (might be pre-compiled)
121
+ console.warn("ts-node/register failed. Ensure ts-node is installed if you are using .tsx/.ts views in runtime.");
119
122
  }
120
123
  }
121
124
  const pageModule = requireFunc(fullPath);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arcanajs",
3
- "version": "2.0.0",
3
+ "version": "2.0.2",
4
4
  "description": "ArcanaJS Framework",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",