export
steal-tools.export
Export a project's modules to other forms and formats declaratively.
stealTools.export( exportTask, defaults, modules )
Parameters
-
exportTask
{ExportObject}
An ExportObject with the following properties:
-
defaults
{Object<String,ExportOutput>}
OptionalAn object of names and default ExportOutput values.
-
modules
{Array<Object>}
OptionalAn array of module data that an ExportOutput's
modules
,eachModule
,graphs
, orignore
can be filtered against.
Returns
{Promise<BuildResult>}
A Promise that resolves when all outputs have been written out.
Use
stealTools.export
is used to declaratively describe multiple transformations that take place on an application's modules to make it distributable. The [steal-tools/lib/build/helpers/amd], [steal-tools/lib/build/helpers/cjs], and [steal-tools/lib/build/helpers/global] Export Helpers can be used to export censible versions of your project in those formats.The basic use of
stealTools
export is to provide a "steal" that is able to load your project's modules, and several "outputs" that write out those modules in a new form:exportTask
The first argument is an ExportObject. Details about its API and options can be found on its page.
defaults
As there are times when the same options may need to be set over and over again, the
defaults
option can contain default values each output can call:The [steal-tools/lib/build/helpers/cjs] and other export helpers can also be mixed in output names by default:
modules
Deprecated.