@hungry/webpack-sass-theme-loader
v0.1.2
Published
`webpack-sass-theme-loader` ===
Downloads
4
Readme
webpack-sass-theme-loader
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
How to use
Using with @hungry/bulma-theme
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)
Custom theme from scratch
Follow @hungry/bulma-theme
- provide similar interface, this is type RunnableTheme = Reader<InjectedMethods, BulmaTheme>
or just reader.of({/* your camelcased variables */})
Implementation details
@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.