mirror of
https://github.com/sajenim/javascript-template.git
synced 2025-12-16 19:40:39 +08:00
- Changed omnix template name from "default" to "vanilla" for clarity
- Updated flake descriptions to describe project type, not template repo
- Added {{package-name}} variable to vanilla/package.json for substitution
Ensures initialized projects have correct metadata and users see "vanilla"
and "nextjs" as template options during initialization.
41 lines
911 B
Nix
41 lines
911 B
Nix
{inputs, ...}: let
|
|
root = inputs.self;
|
|
in {
|
|
flake = rec {
|
|
templates = {
|
|
default = {
|
|
description = "Minimal JavaScript template with Vite and Bun";
|
|
path = "${root}/templates/vanilla";
|
|
};
|
|
|
|
nextjs = {
|
|
description = "Next.js TypeScript template with App Router";
|
|
path = "${root}/templates/nextjs";
|
|
};
|
|
};
|
|
|
|
om.templates = {
|
|
vanilla = {
|
|
template = templates.default;
|
|
params = [
|
|
{
|
|
name = "package-name";
|
|
description = "Name of the JavaScript package";
|
|
placeholder = "my-project";
|
|
}
|
|
];
|
|
};
|
|
|
|
nextjs = {
|
|
template = templates.nextjs;
|
|
params = [
|
|
{
|
|
name = "package-name";
|
|
description = "Name of the Next.js project";
|
|
placeholder = "my-nextjs-app";
|
|
}
|
|
];
|
|
};
|
|
};
|
|
};
|
|
}
|