What's this?
swts
Typescript Dev Compiler for ServiceWorker and ES6 Modules Era.
Examples
Now only works with Google Chrome Canary.
Install
npm i swts --save
cp node_modules/swts/sw.js ./
Usage
In html
In ES6 module
; swts;
For typescript
Use swts.d.ts
Options
serviceWorkerPath: string required
Path to swts/sw.js.
src required
Path to the root directory of typescript source files.
entry required
Entry module file name.
scope optional default '/'
ServiceWorker scope.
tsconfig optional default '/tsconfig.json'
Path to the tsconfig.json
Contribution
sudo vi /etc/hosts# add entry - 127.0.0.1 localhost.daplie.me git clone git@github.com:brn/swtsnpm installnpm run build-all-debugnpm start
And Open localhost.daplie.me:8686
with Google Chrome Canary M60+.