Skip to content

Instantly share code, notes, and snippets.

@ds0nt
Created July 20, 2015 14:59
Show Gist options
  • Select an option

  • Save ds0nt/20d81b9b48f49368b84c to your computer and use it in GitHub Desktop.

Select an option

Save ds0nt/20d81b9b48f49368b84c to your computer and use it in GitHub Desktop.
#!/bin/bash
for x in $@; do
html=`cat $x`
echo html | grep '\<([A-Z]\S*).*\>'
target="$(dirname $x)/$(basename -s .html $x).js"
(echo "import { element } from 'deku'"; echo 'export default {'; echo -e " render: ({props}) => $html"; echo '}')> $target
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment