Skip to content

Commit

Permalink
🆙 tsbuild 6.9.10 with typings
Browse files Browse the repository at this point in the history
  • Loading branch information
volkanceylan committed Nov 14, 2023
1 parent 210bd33 commit 0954310
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 2 deletions.
60 changes: 60 additions & 0 deletions packages/tsbuild/dist/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
export const importAsGlobalsMapping: Record<string, string>;

export interface TSBuildOptions {
/** Enable bundling of dependencies, default is true */
bundle?: boolean;

/** Chunk names to generate when code splitting is enabled. Default is '_chunks/[name]-[hash]' */
chunkNames?: string[];

/** True to enable the clean plugin. Default is true if splitting is true. */
clean?: boolean;

/**
* Determines the set of entry points that should be passed to the esbuild.
* Only use to specify full paths of entry points manually if you calculated them yourself.
* Prefer specifying entry point globs in sergen.json under TSBuild:EntryPoints which
* defaults to ['Modules/** /*Page.ts', 'Modules/** /*Page.tsx', 'Modules/** /ScriptInit.ts'] */
entryPoints?: string[];

/**
* A set of mappings to pass to the importAsGlobalsPlugin. If this is undefined or any object and the plugins
* is not specified, importAsGlobals plugin is enabled */
importAsGlobals?: Record<string, string>;

/**
* True to enable metafile generation by esbuild. Default is true.
* If this is false, clean plugin won't work properly.
*/
metafile?: boolean;

/** True to enable minification. Default is true. */
minify?: boolean;

/** Base directory for calculating output file locations in output directory. Default is "./" */
outbase?: string;

/** Base output directory. Default is wwwroot/esm */
outdir?: boolean;

/** True to enable code splitting. Default is true unless --nosplit is passed in process arguments. */
splitting?: boolean;

/** Set of plugins for esbuild */
plugins?: any[];

/** Should source maps be generated. Default is true. */
sourcemap?: boolean;

/* Javascript target for output files. Default is es6. */
target?: string;

/** True to watch, default is calculated from process args and true if it contains --watch */
watch?: boolean;
}

/** Processes passed options and converts it to options suitable for esbuild */
export const esbuildOptions: (opt: TSBuildOptions) => any;
export const build: (opt: TSBuildOptions) => Promise<void>;
export function importAsGlobalsPlugin(mapping: Record<string, string>): any;
export function cleanPlugin(): any;
5 changes: 3 additions & 2 deletions packages/tsbuild/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@serenity-is/tsbuild",
"version": "6.9.8",
"version": "6.9.10",
"author": "Serenity (https://serenity.is)",
"bugs": "https://github.com/serenity-is/serenity/issues",
"description": "Serenity ESBuild functions",
Expand Down Expand Up @@ -30,5 +30,6 @@
],
"license": "MIT",
"repository": "https://github.com/serenity-is/serenity/packages/tsbuild",
"type": "module"
"type": "module",
"types": "dist/index.d.ts"
}

0 comments on commit 0954310

Please sign in to comment.