• typedef
steal-tools.StealConfig {Object}  

Configuration values needed for StealJS to load modules. Some set of the following values are required:



  1. main {String | Array<moduleName>}Optional

    The module, or modules, that should be imported. This sets main.

    • It is optional if a config is provided.
  2. config {String}Optional

    The path to a configuration file. This will also specify baseURL, and sometimes main. This sets configPath.

    • It is optional if main is provided and no other configurations are needed.
    • It is required if you are using NPM.
  3. meta {Object<moduleName,metadata>}Optional

    A object of that contain metadata

  4. baseURL {String}Optional

    If a configuration file is not used, the baseURL value must be set.

  5. bundle {Array<moduleName>}Optional

    An array of that should be progressively loaded. See steal's bundle property for more information.

  6. jsonOptions {Object<jsonOptions>}Optional

    Provides options that can be applied to JSON loading. Using the transform method will run through all JSON files while building, also the package.json's of loaded modules (if using NPM).


build, export, and transformImport all take a StealConfig, which configures the modules to load., ...)
stealTools.pluginifier(StealConfig, ...)
stealTools["export"]({steal: StealConfig, outputs: {...}});

If your config file specifies main, all that is needed is the config location:{config: __dirname+"/package.json!npm"}, ...)
stealTools.pluginifier({config: __dirname+"/package.json!npm"}, ...)
  steal: {config: __dirname+"/package.json!npm"}, 
  outputs: {...}

Otherwise, main and config are probably needed:{
  config: __dirname+"/config.js",
  main: "myproject"
}, ...);

  config: __dirname+"/config.js",
  main: "myproject"
}, ...);

  steal: {
    config: __dirname+"/config.js",
    main: "myproject"
  outputs: {...}

If there is no config, you should specify the baseURL, so StealJS knows where to find your modules.

Help us improve StealJS by taking our community survey