bdv2-theme-converter
Converts BDv2 themes to legacy BD themes and Stylus UserStyles.
Installation
npm
$ npm install --save ObserverOfTime/bdv2-theme-converteryarn
$ yarn add ObserverOfTime/bdv2-theme-converterDocumentation
You can view the documentation here.
Usage
// Require the BDv2 config file
const config = require('./config');
// Set the paths
const paths = {
    root: './',
    src: 'SomeTheme.scss',
    dest: {
        legacyTheme: 'SomeTheme.theme.css',
        userStyle: 'SomeTheme.user.css',
        minified: 'SomeTheme.min.theme.css'
    }
};
// Initialise the converter
const converter = require('bdv2-theme-converter').init(config, paths);
// Convert to a legacy BD theme with compact style
converter.toLegacyTheme({outputStyle: 'compact'});
// Convert to a UserStyle with expanded style and MIT license
converter.toUserStyle({outputStyle: 'expanded'}, {license: 'MIT'});
// Convert to a minified legacy BD theme
converter.toMinified({}, true);Dependencies 
- node-sass: Wrapper around libsass
 - semver: The semantic version parser used by npm.
 - to-title-case: Convert a string to title case.
 - usercss-meta: Parse the metadata of usercss used by Stylus extension
 
Dev Dependencies 
- eslint: An AST-based pattern checker for JavaScript.
 - jsdoc: An API documentation generator for JavaScript.
 - postman-jsdoc-theme: A JSDoc Theme / Template
 
TODO
- Parse BDv2 settings into CSS and UserCSS variables.