0.1.2 • Published 6 years ago
@hungry/webpack-sass-theme-loader v0.1.2
webpack-sass-theme-loader
This library has 3 goals
- running and passing
@hungry/bulma-themetosass-var-loader - detecting automatically
sassrule withinwebpackconfig and inject it into the correct place decamelizeallthemevariables 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.