Skip to content

Commit

Permalink
feat: support framework config (#1843)
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 authored Nov 12, 2023
1 parent 25d07fb commit 786d3f8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { withLeadingSlash, withoutTrailingSlash, withTrailingSlash } from "ufo";
import { isTest, isDebug, nodeMajorVersion, provider } from "std-env";
import { findWorkspaceDir } from "pkg-types";
import consola from "consola";
import { version } from "../package.json";
import {
resolvePath,
resolveFile,
Expand Down Expand Up @@ -125,6 +126,12 @@ const NitroDefaults: NitroConfig = {
nodeModulesDirs: [],
hooks: {},
commands: {},

// Framework
framework: {
name: "nitro",
version,
},
};

export interface LoadConfigOptions {
Expand Down
7 changes: 7 additions & 0 deletions src/types/nitro.ts
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,13 @@ export interface NitroOptions extends PresetOptions {
deploy: string;
};

// Framework
framework: {
// eslint-disable-next-line @typescript-eslint/ban-types
name?: "nitro" | (string & {});
version?: string;
};

// IIS
iis?: {
mergeConfig?: boolean;
Expand Down

0 comments on commit 786d3f8

Please sign in to comment.