Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}`
)
}
if (
node.lang === 'jsx' &&
// yes, i know this won't work if you don't use line comments and stuff
// but adding a whole js parser and stuff to do this would be more effort than it's worth
livePattern.test(node.value)
) {
let cleanValue = node.value.replace('// @live', '').trim()
node.type = `html`
node.value = escapeGoat.escapeTag``
}
})
}
// https://github.com/developit/preact-www/blob/cb47a5015ea666930ead6eebc2917307db6c1db6/src/components/controllers/repl/worker.js
importScripts('https://unpkg.com/@babel/standalone@7.0.0/babel.min.js')
const babelPluginEmotion = require('babel-plugin-emotion').default
global.window = global
addEventListener('message', ({ data }) => {
let { id, method, params } = data
Promise.resolve()
.then(() => ACTIONS[method](...[].concat(params)))
.then(result => postMessage({ id, result }))
.catch(({ message, loc }) => postMessage({ id, error: { message, loc } }))
})
const options = {
presets: [
'es2015',
'react',
[
// https://github.com/developit/preact-www/blob/cb47a5015ea666930ead6eebc2917307db6c1db6/src/components/controllers/repl/worker.js
importScripts('https://unpkg.com/@babel/standalone@7.0.0/babel.min.js')
const babelPluginEmotion = require('babel-plugin-emotion').default
global.window = global
addEventListener('message', ({ data }) => {
let { id, method, params } = data
Promise.resolve()
.then(() => ACTIONS[method](...[].concat(params)))
.then(result => postMessage({ id, result }))
.catch(({ message, loc }) => postMessage({ id, error: { message, loc } }))
})
const options = {
presets: [
'es2015',
'react',
[
module.exports = require('babel-plugin-emotion').macros.createStyledMacro({
importPath: '@emotion/preact-styled-base',
isWeb: true
})
module.exports = require('babel-plugin-emotion').macros.createStyledMacro({
importPath: '@emotion/preact-styled-base',
isWeb: true
})
module.exports = require('babel-plugin-emotion').macros.createStyledMacro({
importPath: '@emotion/styled-base',
originalImportPath: '@emotion/styled',
isWeb: true
})
module.exports = require('babel-plugin-emotion').macros.createStyledMacro({
importPath: '@emotion/styled-base',
isWeb: true
})
module.exports = require('babel-plugin-emotion').macros.css
module.exports = require('babel-plugin-emotion').macros.createEmotionMacro(
'emotion'
)