JSPM

  • Created
  • Published
  • Downloads 10
  • Score
    100M100P100Q61614F
  • License MIT

ContextJS - Json Configuration

Package Exports

  • @contextjs/configuration-json
  • @contextjs/configuration-json/api/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@contextjs/configuration-json) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@contextjs/configuration-json

Tests npm License

JSON configuration management

Installation

npm i @contextjs/configuration-json

Extensions

/**
 * Module declaration for "@contextjs/configuration".
 */
declare module "@contextjs/configuration" {
    /**
     * Interface representing configuration options.
     */
    export interface ConfigurationOptions {
        /**
         * Adds a JSON configuration provider to the application configuration.
         * 
         * @param {(configurationOptions: JsonConfigurationOptions) => void} options - A callback function to configure JSON-specific options.
         * @returns {ConfigurationOptions} - The current configuration options instance.
         */
        useJsonConfiguration(options: (configurationOptions: JsonConfigurationOptions) => void): ConfigurationOptions;
    }
}

Options

/**
 * Class representing options for JSON configuration.
 */
export declare class JsonConfigurationOptions {

    /**
     * Use a file for configuration.
     * 
     * @param {string} file - The file to use for configuration.
     * @returns {JsonConfigurationOptions} - The instance of JsonConfigurationOptions.
     */
    public useFile(file: string): JsonConfigurationOptions;

    /**
     * Use a file for configuration with a specific environment name.
     * 
     * @param {string} file - The file to use for configuration.
     * @param {string} environmentName - The environment name.
     * @returns {JsonConfigurationOptions} - The instance of JsonConfigurationOptions.
     */
    public useFile(file: string, environmentName: string): JsonConfigurationOptions;
}