Skip to content

Latest commit

 

History

History
100 lines (64 loc) · 3.77 KB

File metadata and controls

100 lines (64 loc) · 3.77 KB

Hooks for roc-package-module-dev

Hooks

roc

update-settings

Expected to return new settings that should be merged with the existing ones.

Makes it possible to modify the settings object before a command is started and after potential arguments from the command line and configuration file have been parsed. This is a good point to default to some value if no was given or modify something in the settings.

Initial value: Nothing
Expected return value: Object()

Arguments

Name Description Type Required Can be empty
getSettings A function that returns the settings after the context has been initialized. Function No

roc-abstract-package-base-dev

after-clean

Hook point for adding code that runs after the clean command is invoked.

Initial value: Nothing
Expected return value: Nothing

before-clean

Hook point for adding code that runs before the clean command is invoked.

Initial value: Nothing
Expected return value: Array(String)

run-build-command

Use to add things that should react to the build command being called.

Initial value: Nothing
Expected return value: Function

Arguments

Name Description Type Required Can be empty
targets The targets to build for, will be based on settings or a possible argument if defined. Array(String) Yes No

run-dev-command

Use to add things that should react to the dev command being called.

Initial value: Nothing
Expected return value: Nothing

Arguments

Name Description Type Required Can be empty
targets The targets use for dev, will be based on settings or a possible argument if defined. Array(String) Yes No

roc-package-module-dev

after-clean

Expected to return a presets to add to the array of presets to use.

Initial value: []
Expected return value: Array(String)

Arguments

Name Description Type Required Can be empty
target The target, will by default be either "cjs" or "esm". String No Yes

babel-config

Used to create a Babel configuration to be used.

Initial value: {}
Expected return value: Object()

Arguments

Name Description Type Required Can be empty
target The target, will by default be either "cjs" or "esm". String No Yes