Skip to content

braneproject/webapp2worker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Webapp to WorkerDOM

Usage: webapp2worker <index_path:string>

Description:

  Convert a plain webapp to the WorkerDOM script

Options:

  -h, --help              - Show this help.
  -p, --path    [path]    - Base directory path to resolve assets

Usage

w2w path/to/index.html > script.js

Then upgrade element using the result;

<!DOCTYPE html>
<html>
<body>
  <div src="script.js" id="upgrade-me"></div>
  <script type="module">
    import {upgradeElement} from 'worker-dom/main.mjs';
    upgradeElement(document.getElementById('upgrade-me'), 'worker-dom/worker.mjs');
  </script>
</body>
</html>

Development

This command is CLI developed using Deno v1.17.0

You can compile binary your self

deno compile --allow-read cli.ts

About

Convert a plain webapp to the WorkerDOM script

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published