Last active
August 3, 2017 15:27
-
-
Save barneycarroll/42dc3f433e50d9f917761b9079db2189 to your computer and use it in GitHub Desktop.
Tools: current to better
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"scripts": { | |
"start": "server.js" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ "foo" : "bar" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ "fizz" : "buzz" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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