Skip to content

Commit a7e8f0f

Browse files
author
Shane Osbourne
committed
added a more realistic starting point for docs
1 parent 9db4265 commit a7e8f0f

File tree

4 files changed

+53
-2
lines changed

4 files changed

+53
-2
lines changed

packages/special-pages/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
* A collection of HTML/CSS/JS pages that can be loaded into privileged environments, like `about: pages`
88
*
99
* - {@link "Example Page"}
10+
*
11+
* [[include:packages/special-pages/readme.md]]
12+
*
1013
*/
1114
import { join } from 'node:path'
1215
import { existsSync, cpSync, rmSync } from 'node:fs'
Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,34 @@
1-
This is an example 'special' page. It contains a `public` folder which will be the output
2-
that native platforms will refer to
1+
This is an example 'special' page. It's designed to be a template for future pages.
2+
3+
### Integration
4+
5+
Serve the entire folder found under `build/<PLATFORM>/pages/example`
6+
7+
### Platform Integration
8+
9+
- On Windows, do x, y, z
10+
- On Android, do a, b, c
11+
12+
---
13+
14+
## Contributing
15+
16+
### HTML
17+
The main HTML file is located at `public/index.html`. You can edit this file directly
18+
19+
### CSS
20+
The main stylesheet is located at `public/style.css`. You can edit this file directly
21+
22+
### Javascript
23+
JavaScript source files are located in the `src` directory. The build process will create a bundle and place it inside `public/generated`.
24+
25+
This is why the `index.html` file has the following `<script>` tag.
26+
27+
```html
28+
<script type="module" src="generated/js/index.js"></script>
29+
```
30+
31+
Don't edit the generated files directly - any changes you make will not be reflected in the final build output.
32+
33+
Instead, make your changes in `src/' and then run `npm run build.pages` from the `packages/special-pages` folder
34+

packages/special-pages/readme.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
## Architecture
2+
3+
Special Pages gives us a single place to implement isolated HTML/CSS/Javascript projects that can be loaded into a web context that has privileged access to API.
4+
5+
- `packages/special-pages/pages/example`
6+
- `packages/special-pages/pages/duckplayer`
7+
8+
Would translate into the following build output
9+
10+
- `build/apple/pages/example`
11+
- `build/apple/pages/duckplayer`
12+
- `build/windows/pages/example`
13+
- `build/windows/pages/duckplayer`
14+
15+
This allows each respective platform to configure their integrations to use the known page.

typedoc.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"inject/mozilla.js",
88
"inject/windows.js",
99
"packages/messaging",
10+
"packages/special-pages",
1011
"packages/special-pages/pages/example/src/index.js"
1112
],
1213
"categoryOrder": [

0 commit comments

Comments
 (0)