Skip to content
This repository has been archived by the owner on Jan 2, 2018. It is now read-only.

Latest commit

 

History

History
165 lines (104 loc) · 4.64 KB

File metadata and controls

165 lines (104 loc) · 4.64 KB

Hooks for roc-package-web-app-react-dev

Hooks

roc-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: [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
targets The targets to build for, will be based on settings or a possible argument if defined. [String]

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
targets The targets use for dev, will be based on settings or a possible argument if defined. [String]

roc-package-web-app-dev

server-started

Initial value: Nothing
Expected return value: Nothing

roc-package-webpack-dev

build-webpack

Used to create the final Webpack configuration object.

Initial value: {}
Expected return value: {}

Arguments

Name Description Type
target The target for which the Webpack configuration should be build for. String

create-watchers

Used to add watchers that should follow a specific format.

Initial value: {}
Expected return value: {Function}

get-webpack-targets

Used to inform which targets that should be considered as Webpack targets. Actions should concat the previousValue to build the complete value.

Initial value: []
Expected return value: [String]

roc-package-webpack-node-dev

dev-process-created

Used to react to when the development server has started.

Initial value: Nothing
Expected return value: Nothing

Arguments

Name Description Type
serverProcess The created server process.

roc-plugin-assets-images

add-image

Used for adding additional image loaders.

Important that the actions return an array with loaders or a single loader

Initial value: Nothing
Expected return value: {} / [{}]

roc-plugin-start

get-potential-target

Use to define for what target that it should try to find a resource for to start with.

Initial value: "node"
Expected return value: String

get-resolve-paths

Use to add paths that should be resolved before starting an application.

Initial value: Nothing
Expected return value: String / [String]

register-runtime

Can be used to modify the runtime before an application starts.

Initial value: Nothing
Expected return value: Nothing

roc-plugin-style-css

add-style

Used for adding additional style loaders.

Important that the actions return an object matching the following:

{ extensions: String/[String], loaders: String/[String] }

Initial value: Nothing
Expected return value: {String / [String]}