Loads a module, and its dependencies, and provides a transform method, so they can be written out in another form.
Loads a module, and all of its dependencies, and returns a function that
can write out all, or parts, of the module and its dependency graph,
so that they don't depend on
Specifies configuration values to set on a Steal loader. The main option must be specified. Typically, configPath is also specified, as that is used to set baseURL. Any Steal configuration can be specified; however, most other build configuration values are specified by buildConfig in the config file.
Configures the behavior of loading the modules, and acts as default values for the resulting transform function's options argument.
A deferred, which resolves to a function that can write out all or part of the loaded dependency tree.
stealTools.transformImportlets you transform modules to a different format or form. It's passed a StealConfig, which is used to load modules. Once all modules have been loaded, it provides a transform method that can write out modules:
transformare low-level functionality. For the majority of projects, export will be a better fit for the most common transformation behavior.
Like build, transformImport can be used from the command-line, from Grunt, or programmatically in Node.js. For this example, we're going to use transformImport programmatically, in order to showcase its more advanced functionality:
As you can see, transformImport takes an object containing the configuration and returns a Promise. The promise will return another function (named "transform" in this example) that can be used to generate a string containing a module and its dependencies. By default, the transform function will return the main module; but it can be used to generate any dependency in the graph.