Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Tools: current to better
{
"scripts": {
"start": "server.js"
}
}
import React from 'react'
import { render } from 'react-dom'
import ActualComponent from './src/ActualComponent.jsx'
render(
<ActualComponent endpoint="./data1.json" someOtherProp="whatever I want" />
document.body
)
// Pseudo-code
export default function(){
const packages = readDirectory('./packages')
const compile = packages.forEach(package => {
transform({
source: getFile('./packages/' + package + '/index.jsx'),
output: '/tmp/' + package + '/index.js',
})
})
watch(component + '**/*.jsx', change => {
compile()
})
compile()
server('/tmp')
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment