How to use the jss.default function in jss

To help you get started, we’ve selected a few jss 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')
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()
}