@bb-cli/find-and-build

Finds CXP Items And Builds Sources

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
@bb-cli/find-and-build
1.3.06 years ago8 years agoMinified + gzip package size for @bb-cli/find-and-build in KB

Readme

Modules

@bb-cli/find-and-build

Finds CXP Items And Builds Sources

defaultPromise.<Array.<CXPItem>>

Find unbuilt items, and prebuilt items. Build the unbuilt ones, merge them with the prebuilt ones and return them.


@bb-cli/find-and-build

Finds CXP Items And Builds Sources
* _static_
    * [.buildToDir(unbuiltPaths, builtPaths, exclude, outputDir, plugins)](#module_@bb-cli/find-and-build.buildToDir) ⇒ <code>Promise.<Array.<CXPItem>></code>
* _inner_
    * [~CXPItem](#module_@bb-cli/find-and-build..CXPItem) : <code>Object</code>
    * [~FoundItems](#module_@bb-cli/find-and-build..FoundItems) : <code>Object</code>

@bb-cli/find-and-build.buildToDir(unbuiltPaths, builtPaths, exclude, outputDir, plugins) ⇒ Promise.<Array.<CXPItem>>

Find unbuilt items, and prebuilt items. Build the unbuilt ones, merge them with the prebuilt ones and return them.
Kind: static method of @bb-cli/find-and-build
Returns: Promise.<Array.<CXPItem>> - Array of items built
| Param | Type | Description | | --- | --- | --- | | unbuiltPaths | Array.<string> | Paths to unbuilt sources | | builtPaths | Array.<string> | Array of paths to pre-built sources | | exclude | Array.<string> | Array of paths to exclude from packaging | | outputDir | string | File system path to output built items to | | plugins | Array.<string> | Array of paths/node modules to use as build plugins |
Example
import { buildToDir } from '@bb-cli/find-and-build';
buildToDir(['.'], ['node_modules'], ['target'], 'target/build', ['sass'])
  .then(items => console.log(`${items.length} items`));

@bb-cli/find-and-build~CXPItem : Object

An object that describes a catalog item in CXP Manager.
Kind: inner typedef of @bb-cli/find-and-build
Properties
| Name | Type | Description | | --- | --- | --- | | name | string | The CXP item name. | | type | string | The CXP item type. | | version | string | The CXP item version. | | srcDir | string | The path to the item's source on the file system. | | distDir | string | The path to the built code on the file system, if it was built. | | files | Array.<string> | The files for this item |

@bb-cli/find-and-build~FoundItems : Object

An object that describes found CXP items.
Kind: inner typedef of @bb-cli/find-and-build
Properties
| Name | Type | | --- | --- | | unbuiltItems | Array.<CXPItem> | | prebuiltItems | Array.<CXPItem> |

default ⇒ Promise.<Array.<CXPItem>>

Deprecated
Find unbuilt items, and prebuilt items. Build the unbuilt ones, merge them with the prebuilt ones and return them.
Returns: Promise.<Array.<CXPItem>> - Array of items built
| Param | Type | Description | | --- | --- | --- | | unbuiltPaths | Array.<string> | Paths to unbuilt sources | | builtPaths | Array.<string> | Array of paths to pre-built sources | | exclude | Array.<string> | Array of paths to exclude from packaging | | plugins | Array.<string> | Array of paths/node modules to use as build plugins |
Example
import findAndBuild from '@bb-cli/find-and-build';
findAndBuild(['.'], ['node_modules'], ['target'], ['sass'])
  .then(items => console.log(`${items.length} items`));