https://github.com/lamplightdev/compost-hn
https://github.com/lamplightdev/compost-hn
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/lamplightdev/compost-hn
- Owner: lamplightdev
- License: mit
- Created: 2018-02-02T20:18:41.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2023-01-09T11:22:23.000Z (over 3 years ago)
- Last Synced: 2024-04-14T01:10:57.667Z (about 2 years ago)
- Language: JavaScript
- Size: 381 KB
- Stars: 12
- Watchers: 4
- Forks: 3
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# compost-hn
> A [Hacker News PWA](https://hnpwa.com/) implementation using native Web Components and [compost](https://github.com/lamplightdev/compost) - a small collection of web component mixins.
Uses the unofficial HackerNews API [HNPWA API](https://github.com/tastejs/hacker-news-pwas/blob/master/docs/api.md), and works on all modern browsers.
See [https://compost-35844.firebaseapp.com](https://compost-35844.firebaseapp.com) for a live production build.
## Build
### Development
Ideal for testing out the implementation.
`npm install`
`npm run build:dev`
This copies the required files from `node_modules` into the `public` directory, bundles the js with sourcemaps (using [rollup](https://rollupjs.org)), and creates a service worker.
### Production
Currently geared towards firebase hosting.
`npm install`
`npm run build:prod`
`firebase deploy`
This does the same as the dev build but creates a separate `build` directory for deploying, creates a firebase function to preload and cache API results for the root page, and sets cache control for static assets.