gro_plugin_server.ts view source
CreateOutpaths import type {CreateOutpaths} from '@fuzdev/gro/gro_plugin_server.js'; (call)
type (dev: boolean): Outpaths
dev
boolean8 declarations
gro_plugin_server.ts view source
CreateOutpaths import type {CreateOutpaths} from '@fuzdev/gro/gro_plugin_server.js'; (call)type (dev: boolean): Outpaths
devbooleangro_plugin_server.ts view source
({ entry_points, dir, outpaths, env_files, ambient_env, svelte_config, target, esbuild_build_options, rebuild_throttle_delay, cli_command, run }?: GroPluginServerOptions): Plugin<PluginContext<object>> import {gro_plugin_server} from '@fuzdev/gro/gro_plugin_server.js'; __0{}Plugin<PluginContext<object>>
gro_plugin_server.ts view source
GroPluginServerOptions import type {GroPluginServerOptions} from '@fuzdev/gro/gro_plugin_server.js'; entry_points?same as esbuild's entryPoints
type string[]
```[to_server_source_id()]```dir?type string
cwdoutpaths?Returns the Outpaths given a dev param. Decoupling this from plugin creation allows it to be created generically, so the build and dev tasks can be the source of truth for dev.
type (dev: boolean): Outpaths
`to_default_outpaths`devbooleanenv_files?type string[]
```SvelteKit's `.env`, `.env.development`, and `.env.production````ambient_env?type Record<string, string>
process.envsvelte_config?An already-loaded Svelte config, to skip resolving the project's Vite config.
type Config
```resolved from the project's Vite config````target?type string
'esnext'esbuild_build_options?Optionally map the esbuild options.
type (base_options: BuildOptions): BuildOptions
`identity`base_optionsBuildOptionsBuildOptionsrebuild_throttle_delay?Milliseconds to throttle rebuilds. Should be longer than it takes to build to avoid backpressure.
type number
1000cli_command?The CLI command to run the server, like 'node' or 'bun' or 'deno'.
Receives the path to the server js file as its argument.
type string
'node'run?Whether to run the server or not after building.
type boolean
`dev`gro_plugin_server.ts view source
(path?: string | undefined): Promise<Result<object, { message: string; }>> import {has_server} from '@fuzdev/gro/gro_plugin_server.js'; path?the server entry point to look for, defaults to to_server_source_id()
stringPromise<Result>
gro_plugin_server.ts view source
Outpaths import type {Outpaths} from '@fuzdev/gro/gro_plugin_server.js'; outdirtype string
'.gro/dev' or 'dist_server'outbasetype string
`src/lib`outnametype string
'server.js'gro_plugin_server.ts view source
"server/server.ts" import {SERVER_SOURCE_PATH} from '@fuzdev/gro/gro_plugin_server.js'; The server entry point, relative to the project's lib directory.
gro_plugin_server.ts view source
(dir: string, lib_dir: string): CreateOutpaths import {to_default_outpaths} from '@fuzdev/gro/gro_plugin_server.js'; The Outpaths used when the plugin is given none.
dirstringlib_dirstringCreateOutpaths gro_plugin_server.ts view source
(lib_path?: string): PathId import {to_server_source_id} from '@fuzdev/gro/gro_plugin_server.js'; The server entry point of a project whose lib directory is lib_path.
lib_pathstringLIB_PATHPathId