mirror of
https://github.com/sajenim/javascript-template.git
synced 2025-12-17 03:50:40 +08:00
Refactor into multi-template monorepo with Next.js support
Restructure project to support multiple templates via Nix flakes and omnix. Users can now choose between vanilla JavaScript or Next.js TypeScript templates during initialization. - Move existing template to templates/vanilla/ - Add templates/nextjs/ with App Router, TypeScript, and React 19 - Update flake.nix for multi-template outputs - Add TypeScript support to shared devshell - Preserve FHS compatibility for both templates - Update README with comprehensive template comparison and usage
This commit is contained in:
parent
506821f638
commit
c497b0fc1d
23 changed files with 451 additions and 39 deletions
|
|
@ -22,6 +22,7 @@ in {
|
|||
[
|
||||
bun
|
||||
nodejs
|
||||
typescript
|
||||
eslint
|
||||
just
|
||||
prettierd
|
||||
|
|
|
|||
|
|
@ -1,19 +1,41 @@
|
|||
{inputs, ...}: {
|
||||
{inputs, ...}: let
|
||||
root = inputs.self;
|
||||
in {
|
||||
flake = rec {
|
||||
templates.default = {
|
||||
description = "A minimal JavaScript project template with Bun and Nix";
|
||||
path = inputs.self;
|
||||
templates = {
|
||||
default = {
|
||||
description = "Minimal JavaScript template with Vite and Bun";
|
||||
path = "${root}/templates/vanilla";
|
||||
};
|
||||
|
||||
nextjs = {
|
||||
description = "Next.js TypeScript template with App Router for Vercel";
|
||||
path = "${root}/templates/nextjs";
|
||||
};
|
||||
};
|
||||
|
||||
om.templates.javascript-template = {
|
||||
template = templates.default;
|
||||
params = [
|
||||
{
|
||||
name = "package-name";
|
||||
description = "Name of the JavaScript package";
|
||||
placeholder = "javascript-template";
|
||||
}
|
||||
];
|
||||
om.templates = {
|
||||
javascript-vanilla = {
|
||||
template = templates.default;
|
||||
params = [
|
||||
{
|
||||
name = "package-name";
|
||||
description = "Name of the JavaScript package";
|
||||
placeholder = "my-project";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
javascript-nextjs = {
|
||||
template = templates.nextjs;
|
||||
params = [
|
||||
{
|
||||
name = "package-name";
|
||||
description = "Name of the Next.js project";
|
||||
placeholder = "my-nextjs-app";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue