Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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)
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]],
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()
}