@oazmi/esbuild-plugin-deno - v0.4.0
    Preparing search index...

    Interface DenoJsonSchema

    this is a subset of the "deno.json" file schema, copied from my other project. source link.

    interface DenoJsonSchema {
        name?: string;
        version?: string;
        exports?: Exports;
        importMap?: string;
        imports?: { [alias: string]: string };
        nodeModulesDir?: boolean;
        scopes?: { [key: string]: { [key: string]: string } };
        workspace?: string[];
        [property: string]: any;
    }

    Indexable

    • [property: string]: any
    Index

    Properties

    name?: string

    the name of this jsr package. it must be scoped

    version?: string

    the version of this jsr package.

    exports?: Exports
    importMap?: string

    the location of an additional import map to be used when resolving modules. If an import map is specified as an --importmap flag or using "imports" and "scopes" properties, they will override this value.

    TODO: merging this import-map with the main imports import-map needs to be implemented. however, doing so will force us to make our function async, as we will need to fetch the import map file for it.

    imports?: { [alias: string]: string }

    a map of specifiers to their remapped specifiers.

    Type declaration

    • [alias: string]: string

      the key is the specifier or partial specifier to match, with a value that represents the target specifier.

    nodeModulesDir?: boolean

    enables or disables the use of a local node_modules folder for npm packages. alternatively, use the --node-modules-dir flag or override the config via --node-modules-dir=false.

    TODO: when I'll be implementing npm-package resolution with the "npm:" specifiers later on, I think it will be absolutely necessary for us to have this option turned on. (or at least that's what we are going to have to do anyway (i.e. storing required node packages in the filesystem))

    scopes?: { [key: string]: { [key: string]: string } }

    define a scope which remaps a specifier in only a specified scope.

    TODO: I've never used this, so I'm uncertain about how it works, and its relation to an import-map's "scope" field. I won't bother with this option until I find a personal use/need for it.

    Type declaration

    • [key: string]: { [key: string]: string }

      a definition of a scoped remapping.

      Type declaration

      • [key: string]: string

        the key is the specifier or partial specifier to match within the referring scope, with a value that represents the target specifier.

    workspace?: string[]

    the members of this workspace.

    TODO: I haven't used deno workspaces, so I won't bother implementing this feature for the plugin until much later.