replaywebpage 2.0.0-beta.2 → 2.0.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -4,67 +4,79 @@
4
4
  </div>
5
5
  </h1>
6
6
 
7
- ## Serverless Web Archive Replay
7
+ [Embedded Viewer](https://replayweb.page/docs/embedding/) Usage Stats: [![](https://data.jsdelivr.com/v1/package/npm/replaywebpage/badge)](https://www.jsdelivr.com/package/npm/replaywebpage)
8
8
 
9
- [Embedded Viewer](https://replayweb.page/docs/embedding) Usage: [![](https://data.jsdelivr.com/v1/package/npm/replaywebpage/badge)](https://www.jsdelivr.com/package/npm/replaywebpage)
10
-
11
- ReplayWeb.page provides a full web archive replay system running directly in the browser,
9
+ ReplayWeb.page provides a full web archive viewer that runs directly in the browser,
12
10
  available at: [https://replayweb.page/](https://replayweb.page)
13
11
 
14
12
  For full user docs, see: [https://replayweb.page/docs](https://replayweb.page/docs).
15
13
 
16
- See [CHANGES.md](CHANGES.md) for changes in the latest release.
17
-
18
14
  The ReplayWeb.page App can be downloaded from the [Releases](https://replayweb.page/releases) page.
19
15
 
16
+ See [CHANGES.md](CHANGES.md) for the current changes, or the release notes on the link above.
17
+
20
18
  ### Embedding Guide
21
19
 
22
- See the [Embedding Guide](https://replayweb.page/docs/embedding) for more info on embedding web archives in other sites.
20
+ See the [Embedding Guide](https://replayweb.page/docs/embedding/) for more info on embedding web archives in other sites.
23
21
 
24
22
  ## What's in this repo
25
23
 
26
- ReplayWeb.page is a static web site / offline web app + Electron app.
24
+ ReplayWeb.page provides a static site generated with MkDocs, an npm package/library, and an Electron app all in this repo.
27
25
 
28
- This repository contains the frontend UI for the replay system, while the backend is provided via a service worker
29
- implementation found at: https://github.com/webrecorder/wabac.js
26
+ This repository contains the 'frontend' UI for the replay system, while the 'backend' is provided via a service worker
27
+ implementation found at: https://github.com/webrecorder/wabac.js. (Of course, both frontend and backend actually run in the browser).
30
28
 
31
29
  The frontend is loaded from `ui.js`, while the backend service/web worker is loaded from `sw.js`.
32
30
 
33
31
  This repository contains:
34
32
 
35
- - The built assets for the site hosted at https://replayweb.page/ via GitHub Pages
33
+ - The core site hosted on https://replayweb.page/ via GitHub Pages
34
+ - The docs for https://replayweb.page/docs created with [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/)
36
35
  - The package for npm module: https://www.npmjs.com/package/replaywebpage
37
36
  - A build system for https://replayweb.page and ReplayWeb.page App.
38
- - Docs hosted at: https://replayweb.page/docs
39
37
  - App releases at: https://github.com/webrecorder/replayweb.page/releases
40
38
 
41
39
  ## Running ReplayWeb.page
42
40
 
43
41
  To run ReplayWeb.page and view web archives, a regular HTTP server is all that is needed.
44
42
 
45
- ReplayWeb.page can run with any HTTP server locally. For example, you can run `http-server -p 9990` or `python -m http.server 9990` to run a static web server in the directory of this repository. Then, simply load `http://localhost:9990/` and you'll have replayweb.page running locally.
43
+ ReplayWeb.page can run with any HTTP server locally. For example, you can run `http-server -p 9990` or `python -m http.server 9990` to run a static web server in the directory of this repository after running `yarn run build`. Then, load `http://localhost:9990/` and you'll have the core replayweb.page running locally.
46
44
 
47
45
  ## Developing ReplayWeb.page
48
46
 
49
- ReplayWeb.page is built as a Node package can be installed using yarn:
50
-
51
- `yarn install`
47
+ ReplayWeb.page is built as a Node package can be installed using yarn: `yarn install`
52
48
 
53
- The package provides various commands that can be used with yarn:
49
+ The package provides various commands that can be used with yarn/npm. Some useful commands include:
54
50
 
55
51
  - `yarn start-dev` - to run in dev mode with Webpack dev server on port 9990. Autobuilds dev assets.
56
52
 
57
- - `yarn build` - to build production assets sw.js, ui.js
53
+ - `yarn start-docs` - to build assets in dev mode, and start docs in dev mode. Autobuilds /docs assets.
54
+
55
+ - `yarn start-prod` - to run production site on port 9990, with previously built assets (without docs)
58
56
 
59
- - `yarn start-prod` - to run production site on port 9990, with previously built assets
57
+ - `yarn start-prod-docs` - to build production version of the site and build docs with `/docs` endpoint available.
60
58
 
61
59
  - `yarn start-electron` - to start electron in dev mode, with previously built assets
62
60
 
61
+ - `yarn build` - to build production assets sw.js, ui.js
62
+
63
+ - `yarn build-docs` - to build the docs site in `mkdocs/site` to `mkdocs/_genhtml`
64
+
63
65
  - `yarn dist` - to build production assets + Electron app (in dist/)
64
66
 
65
- The static assets are placed in the root `index.html`, `sw.js` and `ui.js`, and can be used with any HTTP server.
67
+ ### Static Site
68
+
69
+ The static assets are placed in the root `index.html`, `sw.js`, and `ui.js`, and can be used with any HTTP server. This provides the core ReplayWeb.page functionality.
70
+
71
+ ### Static Site + Docs
72
+
73
+ The full site with docs is built using MkDocs. Using the `yarn build-docs` command, the static assets are copied into `mkdocs/site/` and using Markdown in `mkdocs/site/docs`, the final static site is built to `mkdocs/_genhtml`. This is what is published to https://replayweb.page/ via CI.
74
+
75
+
76
+ ### Service Worker Requirements
66
77
 
67
- For service workers to work, they must be served from either localhost or an HTTPS endpoint.
78
+ Note that for the 'backend' service worker to work, the static site must be served from either localhost or an HTTPS endpoint.
79
+ This is browser security requirement and not much can be done to get around that.
68
80
 
69
81
  See the [user docs](https://replayweb.page/docs/) for additional info about using ReplayWeb.page
70
82
 
Binary file