| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
patternlab-node can be required within any Node environment, taking in a configuration file at instantiation.
const config = require('./patternlab-config.json');
const patternlab = require('@pattern-lab/core')(config);Build thoughtful, pattern-driven user interfaces using atomic design principles. Many of these functions are exposed to users within Editions, but direct consumption is also encouraged.
Kind: global namespace
See
License: MIT
Returns current version
Kind: instance property of patternlab
Returns: string - current patternlab-node version as defined in package.json, as string
Builds patterns, copies assets, and constructs user interface
Kind: instance property of patternlab
Returns: Promise - a promise fulfilled when build is complete
Emits: event:PATTERNLAB_BUILD_START, event:PATTERNLAB_BUILD_END
See: all events
| Param | Type | Default | Description |
|---|---|---|---|
| options | object | an object used to control build behavior | |
| [options.cleanPublic] | bool | true | whether or not to delete the configured output location (usually public/) before build |
| [options.data] | object | {} | additional data to be merged with global data prior to build |
| [options.watch] | bool | true | whether or not Pattern Lab should watch configured source/ directories for changes to rebuild |
Returns the standardized default config used to run Pattern Lab. This method can be called statically or after instantiation.
Kind: instance property of patternlab
Returns: object - Returns the object representation of the patternlab-config.json
Returns all file extensions supported by installed PatternEngines
Kind: instance property of patternlab
Returns: Array.<string> - all supported file extensions
Installs plugin already available via node_modules/
Kind: instance property of patternlab
| Param | Type | Description |
|---|---|---|
| pluginName | string | name of plugin |
Fetches starterkit repositories from pattern-lab github org that contain 'starterkit' in their name
Kind: instance property of patternlab
Returns: Promise - Returns an Array<{name,url}> for the starterkit repos
Loads starterkit already available via node_modules/
Kind: instance property of patternlab
| Param | Type | Description |
|---|---|---|
| starterkitName | string | name of starterkit |
| clean | boolean | whether or not to delete contents of source/ before load |
Builds patterns only, leaving existing user interface files intact
Kind: instance property of patternlab
Returns: Promise - a promise fulfilled when build is complete
| Param | Type | Default | Description |
|---|---|---|---|
| [options.cleanPublic] | bool | true | whether or not to delete the configured output location (usually public/) before build |
| [options.data] | object | {} | additional data to be merged with global data prior to build |
| [options.watch] | bool | true | whether or not Pattern Lab should watch configured source/ directories for changes to rebuild |
Static method that returns the standardized default config used to run Pattern Lab. This method can be called statically or after instantiation.
Kind: static property of patternlab
Returns: object - Returns the object representation of the patternlab-config.json
Static method that returns current version
Kind: static property of patternlab
Returns: string - current @pattern-lab/core version as defined in package.json
Server module
Kind: static property of patternlab
Build patterns, copies assets, and constructs user interface. Watches configured source/ directories, and serves all output locally
Kind: static method of server
Returns: Promise - a promise fulfilled when build is complete
| Param | Type | Default | Description |
|---|---|---|---|
| options | object | an object used to control build behavior | |
| [options.cleanPublic] | bool | true | whether or not to delete the configured output location (usually public/) before build |
| [options.data] | object | {} | additional data to be merged with global data prior to build |
| [options.watch] | bool | true | whether or not Pattern Lab should watch configured source/ directories for changes to rebuild |
Reloads any active live-server instances
Kind: static method of server
Returns: Promise - a promise fulfilled when operation is complete
Reloads CSS on any active live-server instances
Kind: static method of server
Returns: Promise - a promise fulfilled when operation is complete
Kind: static property of patternlab
See
Pattern Lab Node is MIT Licensed
| Back | FazBrowse Home | New Git URL |