How to use the jss-preset-default.default function in jss-preset-default

To help you get started, we’ve selected a few jss-preset-default 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 kynikos / wiki-monkey / src / lib / index.js View on Github external
module.exports.init = function () {
  /* eslint-disable global-require */
  const Vue = require('vue').default
  const Vuex = require('vuex').default
  Vue.use(Vuex)
  module.exports = {Vue, Vuex}

  module.exports.h = require('hyperscript')

  module.exports.moment = require('moment')

  const jss = require('jss').default
  jss.setup(require('jss-preset-default').default())
  const jssopts = {classNamePrefix: 'WikiMonkey-'}

  module.exports.jssc = (style) => jss.createStyleSheet(style, jssopts).attach()

  module.exports.styled = require('@kynikos/vue-styled-jss')(jss, jssopts)

  // Clipboard.js doesn't import well with Browserify
  // https://github.com/zenorocha/clipboard.js/issues/535
  // module.exports.ClipboardJS = require('clipboard')
  module.exports.ClipboardJS = require('clipboard/dist/clipboard.min')

  const language = require('element-ui/lib/locale/lang/en').default
  const locale = require('element-ui/lib/locale').default
  locale.use(language)
  require('%/app/element.sass')
  Vue.use(require('element-ui/lib/autocomplete').default)
github alitaheri / jss-rtl / src / main.spec.ts View on Github external
beforeEach(() => {
      jss = create().use(...jssPresetDefault().plugins, rtl());
      sheet = jss.createStyleSheet({
        '@global': {
          '@font-face': {
            src: 'url(/font/Roboot.woff2) format("woff2")',
          },
          '@media(min-width: 480px)': {
            body: {
              padding: [[10, 20, 30, 40]],
            },
          },
          body: {
            padding: [[1, 2, 3, 4]],
          },
          'body-no-flip': {
            flip: false,
            padding: [[1, 2, 3, 4]],
github cssinjs / cli / lib / jssToCss.js View on Github external
const jss = require('jss').default
const preset = require('jss-preset-default').default

jss.setup(preset())

module.exports = function(options) {
  var localJss = jss
  if (options.jss) {
    localJss = require(options.jss)
    options.plugins.forEach(function(name) {
      var exports = require(name)
      var plugin = exports.default || exports
      jss.use(plugin())
    })
  }
  return localJss.createStyleSheet(options.styles).toString()
}

jss-preset-default

Default preset for JSS with selected plugins.

MIT
Latest version published 2 years ago

Package Health Score

70 / 100
Full package analysis

Popular jss-preset-default functions