Skip to content

Latest commit

 

History

History
47 lines (29 loc) · 1.61 KB

File metadata and controls

47 lines (29 loc) · 1.61 KB

Hooks for roc-plugin-style-css

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-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: Object(String / Array(String))

add-style-preloaders

Used to add general loaders early in the chain, before the PostCSS loader.

These loaders will be applied to all styles added from the add-style hook.

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