Socket
Book a DemoInstallSign in
Socket

oneui-loader

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

oneui-loader

A loader used to add SASS themes for OneUI

latest
npmnpm
Version
0.1.1
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

React Toolbox Loader

A webpack loader to add custom theming variables to your React Toolbox Components build process. You can install it as an npm package:

npm install --save-dev toolbox-loader

The configuration file

You just need to create a config file holding the variables you want to modify for your build and tell webpack to include it in the building process. For example you can create a little theme.scss file in your project context folder:

$color-primary: $palette-indigo-500 !default;
$color-primary-dark: $palette-indigo-700 !default;
$color-accent: $palette-pink-a200 !default;
$color-accent-dark: $palette-pink-700 !default;
$color-primary-contrast: $color-dark-contrast !default;
$color-accent-contrast: $color-dark-contrast !default;

Add the file to your css loader

In your webpack configuration you can add an option to webpack specifying the name of the configuration file. By default it's theme.scss so if you call it that way you just need to add the loader:

module: {
    loaders: [{
        test: /(\.scss|\.css)$/,
        loader: ExtractTextPlugin.extract('style', 'css!sass!toolbox')
    }]
},
toolboxTheme: 'theme.scss',
....

With this configuration your SASS files will be loaded with the context provided by your configuration file.

FAQs

Package last updated on 07 Dec 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts