Repository
Current version released
4 years ago
Dependencies
deno.land/x
Versions
- 0.5.2Latest
- 0.5.1
- 0.5.0
- 0.5.0-rc.0
- 0.4.2
- 0.4.0
- 0.4.0-rc.0
- 0.3.7
- 0.3.6
- 0.3.5
- 0.3.4
- 0.3.3
- 0.3.2
- 0.3.1
- 0.3.0
- 0.3.0-alpha.6
- 0.3.0-alpha.5
- 0.3.0-alpha.4
- 0.3.0-alpha.3
- 0.3.0-alpha.2
- 0.3.0-alpha.1
- 0.3.0-alpha.0
- 0.2.3
- 0.2.2
- 0.2.1
- 0.2.0
- 0.1.3
- 0.1.2
- 0.1.1
- 0.1.0
- 0.0.1-alpha.8
- 0.0.1-alpha.7
- 0.0.1-alpha.6
- 0.0.1-alpha.5
- 0.0.1-alpha.4
- 0.0.1-alpha.3
- 0.0.1-alpha.2
- 0.0.1-alpha.1
- 0.0.1-alpha.0
SWDEV
Runtime transfome by Service Worker and Deno(PoC).
How to use
# install
$ deno install -qAf --unstable https://deno.land/x/swdev/swdev.ts
$ swdev init myapp
$ cd myapp
$ swdev serve
CAUTION: port:7777 register service-worker. Unregister service-worker after develop.
How to develop
$ deno run -A --unstable swdev-dev.ts prebuild --client --worker # build __swdev-client and __swdev-server
$ deno run -A --unstable serve.ts examples/react --local # run
Concepts
- Transform and cache in service-worker (
typescript
andsvelte
) - Cache bursting by file change event
- Safe file read / write by
deno
permissions - Use deno semantics in frontend
- Edit itself in browser
- Bundle for production
Install
$ swdev init swdev-app
$ cd swdev-app
$ swdev serve
Experimental Read/Write via websocket`
Run with --allow-write
flag.
$ swdev serve --allow-write
// declare to touch
declare const DenoProxy: {
exec: any;
};
// READ
console.log(await DenoProxy.exec("readTextFile", "index.html"));
// WRITE: need --allow-write
await DenoProxy.exec("writeTextFile", "foo.ts", "export default 1;");
These features are provided by /__swdev_client.js
Experimental Command Run`
Run with --allow-run
flag.
$ swdev serve --allow-run
// declare to touch
declare const DenoProxy: {
exec: any;
};
// RUN commands
await DenoProxy.exec("run", ["ls", "-al"]);
Release build
## Build entry point
$ swdev build #=> main.bundle.js
## Deploy assets
# netlify deploy --prod -d .
LICENSE
MIT