create-ejsx-app
Advanced tools
Comparing version 1.0.4 to 1.0.5
24
index.js
@@ -109,3 +109,5 @@ #!/usr/bin/env node | ||
errorMiddleware: `export const errorHandler = (err, c) => { | ||
errorMiddleware: `import { HTTPException } from 'hono/http-exception'; | ||
export const errorHandler = (err, c) => { | ||
console.error(err); | ||
@@ -175,3 +177,4 @@ | ||
email: z.string().email(), | ||
password: z.string().min(6) | ||
password: z.string().min(6), | ||
name: z.string().optional() | ||
}); | ||
@@ -228,3 +231,3 @@ | ||
pageRoutes: `import { Hono } from 'hono'; | ||
pageRoutes: `import { Hono } from 'hono'; | ||
import ejsx from '@sryden/ejsx'; | ||
@@ -271,3 +274,3 @@ import { getDb } from '../db/setup.js'; | ||
pages.get('/', async (c) => { | ||
const template = \` | ||
const html = await ejsx.render(\` | ||
<% slots.title = 'Home' %> | ||
@@ -283,5 +286,4 @@ <% slots.navbar = renderComponent('Navbar', { user: null }) %> | ||
<%- renderLayout('main', slots) %> | ||
\`; | ||
\`, { slots: {} }); | ||
const html = await ejsx.render(template, {}); | ||
return c.html(html); | ||
@@ -291,3 +293,3 @@ }); | ||
pages.get('/login', async (c) => { | ||
const template = \` | ||
const html = await ejsx.render(\` | ||
<% slots.title = 'Login' %> | ||
@@ -340,5 +342,4 @@ <% slots.navbar = renderComponent('Navbar', { user: null }) %> | ||
<%- renderLayout('main', slots) %> | ||
\`; | ||
\`, { slots: {} }); | ||
const html = await ejsx.render(template, {}); | ||
return c.html(html); | ||
@@ -348,3 +349,3 @@ }); | ||
pages.get('/dashboard', async (c) => { | ||
const template = \` | ||
const html = await ejsx.render(\` | ||
<% slots.title = 'Dashboard' %> | ||
@@ -392,5 +393,4 @@ <% slots.head = \\\` | ||
<%- renderLayout('main', slots) %> | ||
\`; | ||
\`, { slots: {} }); | ||
const html = await ejsx.render(template, {}); | ||
return c.html(html); | ||
@@ -397,0 +397,0 @@ }); |
{ | ||
"name": "create-ejsx-app", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "Create a production-ready Hono & EJSX app with authentication and dashboard", | ||
@@ -5,0 +5,0 @@ "type": "module", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16824
395