jsfiddle-build

build html file from jsfiddle files


Keywords
jsfiddle, cli, python
License
Unlicense
Install
pip install jsfiddle-build==2019.4.11

Documentation

Installation

$ [sudo] pip install jsfiddle-build

How it works

jsfiddle github repo:

.
├── build.html          generated
├── demo.html           required
├── demo.css            optional
├── demo.js             optional
├── demo.details        optional

jsfiddle github gist:

.
├── build.html          generated
├── fiddle.html         required
├── fiddle.css          optional
├── fiddle.js           optional
├── fiddle.manifest     optional

build.html:

<html>
<head>
<title>{title}</title>
{resources}
<style type="text/css">
    {css}
</style>
<script type="text/javascript">
window.onload=function(){
    {js}
}
</script>
</head>
<body>
    {html}
</body>
</html>

Examples

$ find . -name "*.html" ! -name "build.*" | xargs python -m jsfiddle_build

paths with spaces:

OS speed command
any slow find . -name "*.html" ! -name "build.*" -exec python -m jsfiddle_build {} \;
Linux fast find . -name "*.html" ! -name "build.*" -print0 | xargs -d '\n' python -m jsfiddle_build
macOS fast find . -name "*.html" ! -name "build.*" -print0 | xargs -0 python -m jsfiddle_build

Related

Links

readme42.com