How to use @pluralsight/ps-design-system-build - 10 common examples

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 / normalize / build / index.js View on Github external
;(async _ => {
  await fs.mkdir('dist')

  const src = path.join('css', 'index.css')

  postcss.transform(src, path.join('dist', 'index.css'), [
    require('postcss-import'),
    require('postcss-cssnext')({ browsers: ['Last 2 versions', 'IE >= 11'] }),
    require('cssnano')
  ])
})()
github pluralsight / design-system / packages / errors / build / html.js View on Github external
const writeHtml = async (pageType, html) => {
  const outputDir = path.join(__dirname, '..', 'dist', 'html')
  await fs.mkdir(outputDir)
  const outputPath = path.join(outputDir, pageType + '.html')
  await fs.writeFile(outputPath, html)
}
github pluralsight / design-system / packages / core / build / index.js View on Github external
;(async _ => {
  await fs.mkdir('dist')

  const src = path.join('css', 'index.css')
  postcss.transform(src, path.join('dist', 'index.css'), [
    postcssImport,
    postcss.postcssCssVarSelectors(postcssCssVarSelectorsOptions),
    autoprefixer(autoprefixerOptions)
  ])

  postcss.transform(src, path.join('dist', 'index.module.scss'), [
    postcssImport,
    postcss.postcssCssVarSassVar(),
    autoprefixer(autoprefixerOptions)
  ])
})()
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)
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)
github pluralsight / design-system / packages / errors / build / html.js View on Github external
const writeHtml = async (pageType, html) => {
  const outputDir = path.join(__dirname, '..', 'dist', 'html')
  await fs.mkdir(outputDir)
  const outputPath = path.join(outputDir, pageType + '.html')
  await fs.writeFile(outputPath, html)
}
github pluralsight / design-system / packages / normalize / build / index.js View on Github external
;(async _ => {
  await fs.mkdir('dist')

  const src = path.join('css', 'index.css')

  postcss.transform(src, path.join('dist', 'index.css'), [
    require('postcss-import'),
    require('postcss-cssnext')({ browsers: ['Last 2 versions', 'IE >= 11'] }),
    require('cssnano')
  ])
})()
github pluralsight / design-system / packages / core / build / index.js View on Github external
;(async _ => {
  await fs.mkdir('dist')

  const src = path.join('css', 'index.css')
  postcss.transform(src, path.join('dist', 'index.css'), [
    postcssImport,
    postcss.postcssCssVarSelectors(postcssCssVarSelectorsOptions),
    autoprefixer(autoprefixerOptions)
  ])

  postcss.transform(src, path.join('dist', 'index.module.scss'), [
    postcssImport,
    postcss.postcssCssVarSassVar(),
    autoprefixer(autoprefixerOptions)
  ])
})()
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)
github pluralsight / design-system / packages / errors / build / html.js View on Github external
const renderHtml = async page => {
  const { html, css, ids } = renderStatic(_ =>
    renderToStaticMarkup(React.createElement(page))
  )

  const normalize = await fs.readFile(
    path.join(
      __dirname,
      '..',
      'node_modules',
      '@pluralsight',
      'ps-design-system-normalize',
      'dist',
      'index.css'
    ),
    { encoding: 'utf8' }
  )
  const pageCss = `
    body { background: ${core.colors.gray06}; }
  `

  const template = `