This library has 3 goals
- running and passing
@hungry/bulma-theme
tosass-var-loader
- detecting automatically
sass
rule withinwebpack
config and inject it into the correct place decamelize
alltheme
variables and transform theme before applying it tosass-var-loader
To apply on webpack config object you need to provide theme
and config
like so,
import { enableSassTheming } from '@hungry/webpack-sass-theme-loader'
import { theme } from '@hungry/bulma-theme'
const webpackConfig = {}
const withEmbededTheme = enableSassTheming(theme)(webpackConfig)
Follow @hungry/bulma-theme
- provide similar interface, this is type RunnableTheme = Reader<InjectedMethods, BulmaTheme>
or just reader.of({/* your camelcased variables */})
@hungry/bulma-theme
is a wrapped function
by Reader monad
- which provide ability to mapping
and chaining
.
This is, you can remap any variable
by using map
or chain
, but at this level such changes are not necessary as any alteration should be part of theming function.