As usual, the best place to begin is:
npm install
or yarn
Then to transpile and combine the JavaScript:
npm run build
*
(This just runs the rollup
commands for the app source code and the service worker script).
To run the app:
npm start
*
Or you can use any static web server for the public
directory - it's all just front-end.
To watch for changes (in a separate terminal):
npm run watch
*
(This just uses watch
to rebuild the JS when a change is detected in the src directory).
*NB. You should be able to replace npm
with yarn
here, but it's not working with yarn v0.15.1.
Sounds like it should work once this gets released.
Snapwat is called Snapwat because it's a snapshot with "pwa" in it - for Progressive Web App. Also, it's abbreviated to SW, like Service Workers. Good eh? It's pronounced "snap what?" to rhyme with snapshot. Any resemblance to other social apps is purely coincidental...
- Emoji images provided free by EmojiOne.
- Icons by Iconic.
- Camera shutter sound by xef6.
- Thanks to Rich Harris for making a rollup cache manifest example for me (and for rollup in general!)
Please tweet me or email: peter dot oshaughnessy at gmail dot com.
MIT