- dotenv
- Global
- Init
Start
weldable
- Logger
- standalone
- Typescript
- webpack
- webpackConfigs
- dotenv
- ~dotenv :
Object
- ~setupWebpackDotenvFile(filePath, settings) ⇒
undefined
|*
- ~setupWebpackDotenvFilesForEnv(params, settings) ⇒
Array
- ~setupDotenvFile(filePath) ⇒
void
- ~setDotenvParam(params)
- ~setupDotenvFilesForEnv(params, settings) ⇒
object
- ~dotenv :
Package for lib
Kind: inner constant of dotenv
Set up a webpack dotenv plugin config.
Kind: inner method of dotenv
Param | Type |
---|---|
filePath | string |
settings | object |
settings.consoleMessage | object |
For use with webpack configurations. Set up multiple webpack dotenv file parameters.
Kind: inner method of dotenv
Param | Type | Default |
---|---|---|
params | object | |
[params.directory] | string | "<OPTIONS.contextPath>" |
params.env | string | |
settings | object | |
settings.consoleMessage | object | |
settings.setupWebpackDotenvFile | function |
Set up, and access, a dotenv file and the related set of parameters.
Kind: inner method of dotenv
Param | Type |
---|---|
filePath | string |
Set an array of dotenv params
Kind: inner method of dotenv
Param | Type |
---|---|
params | Array.<{param: string, value: string, ignoreIfSet: boolean}> |
A function for use with non-webpack configurations. Set up and access local and specific dotenv file parameters. dotenv parameters are string based, failed or missing dotenv parameters return an empty string.
Kind: inner method of dotenv
Param | Type | Default | Description |
---|---|---|---|
params | object | ||
params.env | string | ||
[params.relativePath] | string | "<OPTIONS.contextPath>" | |
[params.dotenvNamePrefix] | string | "BUILD" | Add an internal prefix to dotenv parameters used for configuration to avoid overlap. |
[params.setBuildDefaults] | boolean | true | |
[params.isMessaging] | boolean | false | |
[params.setExposedParams] | boolean | false | Ignore the potential for dotenv parameter overlap and attempt to set non-prefixed configuration parameters if not already set. |
settings | object | ||
settings.consoleMessage | object | ||
settings.setDotenvParam | function | ||
settings.setupDotenvFile | function |
- Global
- ~jsFileExtensions :
Array.<string>
- ~tsFileExtensions :
Array.<string>
- ~contextPath :
string
- ~OPTIONS :
Object
- ~errorMessageHandler(errors) ⇒
string
|any
|Array.<any>
- ~isPromise(obj) ⇒
boolean
- ~dynamicImport(file) ⇒
Promise.<any>
- ~createFile(contents, options) ⇒
Object
- ~runCmd(cmd, settings) ⇒
string
- ~jsFileExtensions :
JS file extensions
Kind: inner constant of Global
TS file extensions
Kind: inner constant of Global
Global context path. On load set path.
Kind: inner constant of Global
Global options/settings. One time _set, then freeze.
Kind: inner constant of Global
Handle a variety of error types consistently.
Kind: inner method of Global
Param | Type |
---|---|
errors | string | Array | object | any |
Check if "is a Promise", "Promise like".
Kind: inner method of Global
Param | Type |
---|---|
obj | Promise | * |
Import module regardless of CommonJS or ES.
Kind: inner method of Global
Param | Type |
---|---|
file | string |
Create a file with a fallback name based on hashed contents.
Kind: inner method of Global
Param | Type |
---|---|
contents | string |
options | object |
options.dir | string |
options.ext | string |
options.encoding | string |
options.filename | string |
options.resetDir | boolean |
Execute a command
Kind: inner method of Global
Param | Type |
---|---|
cmd | string |
settings | object |
settings.errorMessage | string |
Start weldable
Organize package functionality.
Kind: inner method of Init
Param | Type |
---|---|
options | object |
options.isCreateTsConfigOnly | boolean |
options.isStandalone | boolean |
settings | object |
settings.cleanDist | function |
settings.createTsConfig | function |
settings.createWpConfig | function |
settings.standalone | function |
settings.startWp | function |
- Logger
- ~color :
Object
- ~consoleMessage :
Object
- ~color :
Console output colors
Kind: inner constant of Logger
Convenience wrapper for preset console messaging and colors.
Kind: inner constant of Logger
- standalone
- ~createStandaloneTsConfig(aliasOptions, settings)
- ~outputStandaloneSrcIndexFile() ⇒
string
- ~createStandaloneSrcIndexFile(options, settings)
- ~outputStandaloneWebpackConfig(options, settings) ⇒
string
- ~createStandaloneWebpackConfig(options, settings)
- ~outputStandalonePackageJson() ⇒
string
- ~createStandalonePackageJson(options, settings)
- ~outputStandaloneBabelConfig() ⇒
string
- ~createStandaloneBabelConfig(options, settings)
- ~standalone(settings)
Create a basic standalone tsconfig if isCreateTsConfig is false. This can be overridden with CLI options, or if a tsconfig already exists.
Kind: inner method of standalone
Param | Type |
---|---|
aliasOptions | object |
aliasOptions.isCreateTsConfig | boolean |
aliasOptions.loader | string |
settings | object |
settings.configFilename | string |
settings.consoleMessage | object |
settings.createTsConfig | function |
Output a basic index file.
Kind: inner method of standalone
Create a src/index file for webpack app entry.
Kind: inner method of standalone
Param | Type |
---|---|
options | object |
options.contextPath | string |
options.loader | string |
settings | object |
settings.filename | string |
settings.consoleMessage | object |
settings.createFile | function |
settings.jsFileExtensions | Array.<string> |
settings.tsFileExtensions | Array.<string> |
settings.outputStandaloneSrcIndexFile | function |
Output a file complete webpack configuration
Kind: inner method of standalone
Param | Type |
---|---|
options | object |
options.loader | string |
settings | object |
settings.common | function |
settings.development | function |
settings.preprocessLoaderJs | function |
settings.preprocessLoaderTs | function |
settings.preprocessLoaderNone | function |
settings.production | function |
settings.setDotenvParam | function |
settings.setupWebpackDotenvFile | function |
settings.setupWebpackDotenvFilesForEnv | function |
settings.setupDotenvFile | function |
settings.setupDotenvFilesForEnv | function |
settings.jsFileExtensions | Array.<string> |
settings.tsFileExtensions | Array.<string> |
Update package.json, and conditionally a babel config, in the consuming project root.
Kind: inner method of standalone
Param | Type |
---|---|
options | object |
options.contextPath | string |
settings | object |
settings.filename | string |
settings.consoleMessage | object |
settings.createFile | function |
settings.outputStandaloneWebpackConfig | function |
Output a basic package.json
Kind: inner method of standalone
Update package.json, and conditionally a babel config, in the consuming project root.
Kind: inner method of standalone
Param | Type |
---|---|
options | object |
options.contextPath | string |
options.loader | string |
settings | object |
settings.consoleMessage | object |
settings.createFile | function |
settings.isTestMode | boolean |
settings.packageFileName | string |
settings.outputStandalonePackageJson | function |
settings.runCmd | function |
settings.webpackFileName | string |
Output a basic babel config file.
Kind: inner method of standalone
Create a basic babel config
Kind: inner method of standalone
Param | Type |
---|---|
options | object |
options.contextPath | string |
options.loader | string |
settings | object |
settings.consoleMessage | object |
settings.createFile | function |
settings.filename | string |
settings.outputStandaloneBabelConfig | function |
Organize and output a basic webpack configuration.
Kind: inner method of standalone
Param | Type |
---|---|
settings | object |
settings.consoleMessage | object |
settings.createStandaloneBabelConfig | function |
settings.createStandaloneSrcIndexFile | function |
settings.createStandaloneTsConfig | function |
settings.createStandalonePackageJson | function |
settings.createStandaloneWebpackConfig | function |
Create, or merge, a tsconfig file.
Kind: inner method of Typescript
Param | Type | Description |
---|---|---|
dotenv | object | |
dotenv._BUILD_DIST_DIR | string | |
options | object | |
options.baseTsConfig | string | |
options.contextPath | string | |
options.isCreateTsConfig | boolean | |
options.isMergeTsConfig | boolean | |
options.isRegenTsConfig | boolean | |
settings | object | |
settings.configFilename | string | |
settings.consoleMessage | object | |
settings.createFile | function | |
settings.isMessaging | boolean | Helps with standalone configuration |
- webpack
- ~cleanDist(dotenv)
- ~createWpConfig(options, settings) ⇒
Promise.<object>
- ~startWpErrorStatsHandler(err, stats, options, settings)
- ~startWp(webpackConfig, options, settings) ⇒
Promise.<void>
Clean the "distribution" directory. Compensate for Webpack not cleaning output on development.
Kind: inner method of webpack
Param | Type |
---|---|
dotenv | object |
dotenv._BUILD_DIST_DIR | string |
Webpack merge base configuration files. If available merge extended configuration files.
Kind: inner method of webpack
Param | Type |
---|---|
options | object |
options.nodeEnv | string |
options.dotenv | object |
options.extendedConfigs | Array.<string> |
settings | object |
settings.consoleMessage | function |
settings.dynamicImport | function |
settings.isPromise | function |
settings.webpackCommonConfig | function |
settings.webpackDevelopmentConfig | function |
settings.webpackPreprocessLoaderConfig | function |
settings.webpackProductionConfig | function |
webpack callback error and stats handler. Separated for testing.
Kind: inner method of webpack
Param | Type |
---|---|
err | * |
stats | * |
options | object |
options.stats | undefined | string |
options.statsFile | undefined | string |
options.statsPath | undefined | string |
settings | object |
settings.color | object |
settings.consoleMessage | function |
settings.createFile | function |
settings.errorMessageHandler | function |
Start webpack development or production.
Kind: inner method of webpack
Param | Type |
---|---|
webpackConfig | object |
options | object |
options.nodeEnv | string |
settings | object |
settings.consoleMessage | function |
settings.startWpErrorStatsHandler | function |
settings.webpack | function |
settings.WebpackDevServer | function |
- webpackConfigs
- ~preprocessLoaderJs(dotenv, settings) ⇒
Object
- ~preprocessLoaderTs(dotenv, settings) ⇒
Object
- ~preprocessLoaderNone() ⇒
Object
- ~preprocessLoader(options) ⇒
Object
- ~common(dotenv, settings) ⇒
Object
- ~development(dotenv, settings) ⇒
Object
- ~production(dotenv, settings) ⇒
Object
- ~preprocessLoaderJs(dotenv, settings) ⇒
Assumption based preprocess loader for JS
Kind: inner method of webpackConfigs
Param | Type |
---|---|
dotenv | object |
dotenv._BUILD_SRC_DIR | string |
settings | object |
settings.jsFileExtensions | Array.<string> |
Assumption based preprocess loader for Typescript
Kind: inner method of webpackConfigs
Param | Type |
---|---|
dotenv | object |
dotenv._BUILD_SRC_DIR | string |
settings | object |
settings.jsFileExtensions | Array.<string> |
settings.tsFileExtensions | Array.<string> |
Assumption based preprocess loader for none
Kind: inner method of webpackConfigs
Assumption based preprocess loader
Kind: inner method of webpackConfigs
Param | Type |
---|---|
options | object |
options.loader | string |
Common webpack settings between environments.
Kind: inner method of webpackConfigs
Param | Type |
---|---|
dotenv | object |
dotenv._BUILD_APP_INDEX_PREFIX | string |
dotenv._BUILD_DIST_DIR | string |
dotenv._BUILD_HTML_INDEX_DIR | string |
dotenv._BUILD_PUBLIC_PATH | string |
dotenv._BUILD_RELATIVE_DIRNAME | string |
dotenv._BUILD_SRC_DIR | string |
dotenv._BUILD_STATIC_DIR | string |
dotenv._BUILD_UI_NAME | string |
settings | object |
settings.consoleMessage | object |
settings.jsFileExtensions | Array.<string> |
settings.setupWebpackDotenvFilesForEnv | function |
settings.tsFileExtensions | Array.<string> |
Development webpack configuration.
Kind: inner method of webpackConfigs
Param | Type |
---|---|
dotenv | object |
dotenv.NODE_ENV | string |
dotenv._BUILD_DIST_DIR | string |
dotenv._BUILD_HOST | string |
dotenv._BUILD_HTML_INDEX_DIR | string |
dotenv._BUILD_OPEN_PATH | string |
dotenv._BUILD_RELATIVE_DIRNAME | string |
dotenv._BUILD_PORT | string |
dotenv._BUILD_SRC_DIR | string |
dotenv._BUILD_STATIC_DIR | string |
settings | object |
settings.setupWebpackDotenvFilesForEnv | function |
Production webpack configuration.
Kind: inner method of webpackConfigs
Param | Type |
---|---|
dotenv | object |
dotenv.NODE_ENV | string |
dotenv._BUILD_RELATIVE_DIRNAME | string |
settings | object |
settings.setupWebpackDotenvFilesForEnv | function |