Skip to content

cloudprizm/webpack-sass-theme-loader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

webpack-sass-theme-loader

This library has 3 goals

  • running and passing @hungry/bulma-theme to sass-var-loader
  • detecting automatically sass rule within webpack config and inject it into the correct place
  • decamelize all theme variables and transform theme before applying it to sass-var-loader

Docs

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.

About

Webpack theme loader generated by `sass-ts-theme-creator`

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages