How to use the @pluralsight/ps-design-system-build.css.jsToCss function in @pluralsight/ps-design-system-build

To help you get started, we’ve selected a few @pluralsight/ps-design-system-build examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pluralsight / design-system / packages / badge / build / css.js View on Github external
const path = require('path')
const { fs, css } = require('@pluralsight/ps-design-system-build')

const js = require('../dist/css/index').default

const outputCss = css.jsToCss(js)

const cssOutputPath = path.join(__dirname, '..', 'dist', 'css', 'index.css')
const scssOutputPath = path.join(__dirname, '..', 'dist', 'css', 'index.scss')

fs.writeFile(cssOutputPath, outputCss)
fs.writeFile(scssOutputPath, outputCss)