create-neutron 0.1.0

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 (95) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +25 -0
  3. package/dist/index.d.ts +3 -0
  4. package/dist/index.d.ts.map +1 -0
  5. package/dist/index.js +201 -0
  6. package/dist/index.js.map +1 -0
  7. package/package.json +45 -0
  8. package/templates/app/_gitignore +3 -0
  9. package/templates/app/index.html +12 -0
  10. package/templates/app/neutron.config.ts +5 -0
  11. package/templates/app/package.json +24 -0
  12. package/templates/app/src/main.tsx +5 -0
  13. package/templates/app/src/routes/_layout.tsx +18 -0
  14. package/templates/app/src/routes/api/session/refresh.tsx +28 -0
  15. package/templates/app/src/routes/app/dashboard.tsx +39 -0
  16. package/templates/app/src/routes/app/settings.tsx +68 -0
  17. package/templates/app/src/routes/index.tsx +26 -0
  18. package/templates/app/src/routes/login.tsx +14 -0
  19. package/templates/app/src/routes/protected.tsx +53 -0
  20. package/templates/app/src/routes/users/[id].tsx +26 -0
  21. package/templates/app/tsconfig.json +14 -0
  22. package/templates/app/vite.config.ts +7 -0
  23. package/templates/basic/_gitignore +3 -0
  24. package/templates/basic/index.html +12 -0
  25. package/templates/basic/neutron.config.ts +5 -0
  26. package/templates/basic/package.json +24 -0
  27. package/templates/basic/src/main.tsx +5 -0
  28. package/templates/basic/src/routes/_layout.tsx +16 -0
  29. package/templates/basic/src/routes/index.tsx +19 -0
  30. package/templates/basic/src/routes/users/[id].tsx +26 -0
  31. package/templates/basic/tsconfig.json +14 -0
  32. package/templates/basic/vite.config.ts +7 -0
  33. package/templates/docs/_gitignore +3 -0
  34. package/templates/docs/index.html +12 -0
  35. package/templates/docs/neutron.config.ts +8 -0
  36. package/templates/docs/package.json +22 -0
  37. package/templates/docs/public/favicon.svg +1 -0
  38. package/templates/docs/src/components/Breadcrumbs.tsx +47 -0
  39. package/templates/docs/src/components/Callout.tsx +40 -0
  40. package/templates/docs/src/components/Card.tsx +31 -0
  41. package/templates/docs/src/components/CopyButton.tsx +35 -0
  42. package/templates/docs/src/components/Footer.tsx +72 -0
  43. package/templates/docs/src/components/Search.tsx +139 -0
  44. package/templates/docs/src/components/Sidebar.tsx +59 -0
  45. package/templates/docs/src/components/SidebarToggle.tsx +47 -0
  46. package/templates/docs/src/components/Steps.tsx +9 -0
  47. package/templates/docs/src/components/Tabs.tsx +35 -0
  48. package/templates/docs/src/components/ThemeToggle.tsx +45 -0
  49. package/templates/docs/src/components/Toc.tsx +36 -0
  50. package/templates/docs/src/components/TocTracker.tsx +35 -0
  51. package/templates/docs/src/content/config.ts +13 -0
  52. package/templates/docs/src/content/docs/getting-started/installation.mdx +18 -0
  53. package/templates/docs/src/content/docs/getting-started/quick-start.mdx +19 -0
  54. package/templates/docs/src/content/docs/index.mdx +13 -0
  55. package/templates/docs/src/lib/pagination.ts +39 -0
  56. package/templates/docs/src/lib/sidebar.ts +100 -0
  57. package/templates/docs/src/main.tsx +8 -0
  58. package/templates/docs/src/routes/_layout.tsx +27 -0
  59. package/templates/docs/src/routes/docs/[...slug].tsx +85 -0
  60. package/templates/docs/src/routes/docs/_layout.tsx +47 -0
  61. package/templates/docs/src/styles/code.css +188 -0
  62. package/templates/docs/src/styles/components.css +264 -0
  63. package/templates/docs/src/styles/docs.css +416 -0
  64. package/templates/docs/src/styles/prose.css +224 -0
  65. package/templates/docs/src/styles/search.css +225 -0
  66. package/templates/docs/tsconfig.json +19 -0
  67. package/templates/docs/vite.config.ts +6 -0
  68. package/templates/full/_gitignore +3 -0
  69. package/templates/full/index.html +12 -0
  70. package/templates/full/neutron.config.ts +5 -0
  71. package/templates/full/package.json +24 -0
  72. package/templates/full/src/components/Counter.tsx +13 -0
  73. package/templates/full/src/main.tsx +5 -0
  74. package/templates/full/src/routes/(marketing)/pricing.tsx +15 -0
  75. package/templates/full/src/routes/_layout.tsx +17 -0
  76. package/templates/full/src/routes/app/dashboard.tsx +28 -0
  77. package/templates/full/src/routes/app/settings.tsx +42 -0
  78. package/templates/full/src/routes/index.tsx +31 -0
  79. package/templates/full/src/routes/users/[id].tsx +26 -0
  80. package/templates/full/tsconfig.json +14 -0
  81. package/templates/full/vite.config.ts +7 -0
  82. package/templates/marketing/_gitignore +3 -0
  83. package/templates/marketing/index.html +12 -0
  84. package/templates/marketing/neutron.config.ts +5 -0
  85. package/templates/marketing/package.json +24 -0
  86. package/templates/marketing/src/components/Counter.tsx +14 -0
  87. package/templates/marketing/src/main.tsx +5 -0
  88. package/templates/marketing/src/routes/_layout.tsx +16 -0
  89. package/templates/marketing/src/routes/about.tsx +10 -0
  90. package/templates/marketing/src/routes/blog/[slug].tsx +34 -0
  91. package/templates/marketing/src/routes/blog/index.tsx +27 -0
  92. package/templates/marketing/src/routes/index.tsx +26 -0
  93. package/templates/marketing/src/routes/users/index.tsx +10 -0
  94. package/templates/marketing/tsconfig.json +14 -0
  95. package/templates/marketing/vite.config.ts +7 -0
@@ -0,0 +1,26 @@
1
+ import { Island } from "@neutron-build/core/client";
2
+ import { Counter } from "../components/Counter";
3
+
4
+ export const config = { mode: "static" };
5
+
6
+ export async function loader() {
7
+ return {
8
+ title: "__PROJECT_NAME__",
9
+ generatedAt: new Date().toISOString(),
10
+ };
11
+ }
12
+
13
+ export default function Home(props: { data?: { title: string; generatedAt: string } }) {
14
+ return (
15
+ <section>
16
+ <h2>{props.data?.title}</h2>
17
+ <p>
18
+ Static-first marketing site with optional islands.
19
+ </p>
20
+ <p>
21
+ Generated at <strong>{props.data?.generatedAt}</strong>.
22
+ </p>
23
+ <Island component={Counter} client="visible" id="marketing-counter" start={1} />
24
+ </section>
25
+ );
26
+ }
@@ -0,0 +1,10 @@
1
+ export const config = { mode: "static" };
2
+
3
+ export default function CustomerStories() {
4
+ return (
5
+ <section>
6
+ <h2>Customer Stories</h2>
7
+ <p>Keep this route static for fast delivery and high cache hit rates.</p>
8
+ </section>
9
+ );
10
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "module": "ESNext",
5
+ "moduleResolution": "bundler",
6
+ "lib": ["ES2022", "DOM"],
7
+ "jsx": "react-jsx",
8
+ "jsxImportSource": "preact",
9
+ "strict": true,
10
+ "skipLibCheck": true,
11
+ "types": ["vite/client"]
12
+ },
13
+ "include": ["src"]
14
+ }
@@ -0,0 +1,7 @@
1
+ import { defineConfig } from "vite";
2
+ import preact from "@preact/preset-vite";
3
+ import { neutronPlugin } from "@neutron-build/core/vite";
4
+
5
+ export default defineConfig({
6
+ plugins: [preact(), neutronPlugin()],
7
+ });