Skip to content

Instantly share code, notes, and snippets.

View CompuIves's full-sized avatar

Ives van Hoorne CompuIves

View GitHub Profile
@CompuIves
CompuIves / codesandbox-editor.css
Created April 10, 2017 12:07
CodeSandbox Editor styles
.cm-s-oceanic.CodeMirror {
font-family: 'Source Code Pro', monospace;
background: #1C2022;
color: #e0e0e0;
height: 100%;
font-size: 14px;
font-weight: 500;
}
.cm-s-oceanic div.CodeMirror-selected { background: #374140; }
import babelTranspiler from '../../transpilers/babel';
import jsonTranspiler from '../../transpilers/json';
import stylesTranspiler from '../../transpilers/css';
import sassTranspiler from '../../transpilers/sass';
import rawTranspiler from '../../transpilers/raw';
import stylusTranspiler from '../../transpilers/stylus';
import lessTranspiler from '../../transpilers/less';
import asyncTranspiler from './transpilers/async';
{
"name": "dll_bundle",
"content": {
"./node_modules/fbjs/lib/emptyFunction.js": 0,
"./node_modules/fbjs/lib/invariant.js": 1,
"./node_modules/fbjs/lib/warning.js": 2,
"./node_modules/react": 3,
"./node_modules/fbjs/lib/emptyObject.js": 4,
"./node_modules/object-assign/index.js": 5,
"./node_modules/prop-types/checkPropTypes.js": 6,
{
"aliases": {
"asap": "asap/browser-asap.js",
"asap/asap": "asap/browser-asap.js",
"asap/asap.js": "asap/browser-asap.js",
"asap/raw": "asap/browser-raw.js",
"asap/raw.js": "asap/browser-raw.js",
"asap/test/domain.js": "asap/test/browser-domain.js",
"core-js": "core-js/index.js",
"encoding": "encoding/lib/encoding.js",
const puppeteer = require('puppeteer');
let browser = puppeteer.launch({
args: ['--no-sandbox', '--disable-setuid-sandbox'],
});
async function test(url) {
browser = await browser;
const page = await browser.newPage();
const a = Date.now();
await page.goto(url, {
const SANDBOXES = [
'new',
'preact',
'vue',
'svelte',
'react-ts',
{ id: 'github/reactjs/redux/tree/master/examples/todomvc', threshold: 0.04 },
{ id: 'jvlrl98xw3', threshold: 0.05 },
// And moooore sandboxes
];
const SANDBOXES = [];
describe('sandboxes', () => {
SANDBOXES.forEach(sandbox => {
const id = sandbox.id || sandbox;
const threshold = sandbox.threshold || 0.01;
it(
`loads the sandbox with id '${id}'`,
async () => {
import puppeteer from 'puppeteer';
const SANDBOXES = [
/* ids */
];
function pageLoaded(page) {
return new Promise(async resolve => {
// We expose a function which the bundler will call after evaluation
await page.exposeFunction('__puppeteer__', () => {
#!/bin/bash
docker run --rm --name test-container -v $(pwd):/home/circleci/codesandbox-client -w /home/circleci/codesandbox-client -d -t codesandbox/node-puppeteer yarn start:test && \
sleep 6 && docker exec -it test-container yarn test:integrations && \
docker stop test-container
import * as React from "react";
import * as Vue from "vue/dist/vue";
import VueElement from "./VueElement";
import { PropertyControls, ControlType } from "framer";
// Define type of property
interface Props {
text: string;
}