Skip to content

Commit

Permalink
Write a basic README
Browse files Browse the repository at this point in the history
  • Loading branch information
thewilkybarkid committed Jun 20, 2024
1 parent 949005a commit 3152c68
Showing 1 changed file with 25 additions and 42 deletions.
67 changes: 25 additions & 42 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,53 +1,36 @@
# PREreview Stats

This is an [Observable Framework](https://observablehq.com/framework) project. To start the local preview server, run:
The source code for [stats.prereview.org].

```
npm run dev
```
## Development

Then visit <http://localhost:3000> to preview your project.

For more, see <https://observablehq.com/framework/getting-started>.

## Project structure

A typical Framework project looks like this:

```ini
.
├─ src
│ ├─ components
│ │ └─ timeline.js # an importable module
│ ├─ data
│ │ ├─ launches.csv.js # a data loader
│ │ └─ events.json # a static data file
│ ├─ example-dashboard.md # a page
│ ├─ example-report.md # another page
│ └─ index.md # the home page
├─ .gitignore
├─ observablehq.config.js # the project config file
├─ package.json
└─ README.md
```
<details>

<summary>Requirements</summary>

**`src`** - This is the “source root” — where your source files live. Pages go here. Each page is a Markdown file. Observable Framework uses [file-based routing](https://observablehq.com/framework/routing), which means that the name of the file controls where the page is served. You can create as many pages as you like. Use folders to organize your pages.
- [Docker]
- [GNU Make]
- [Node.js]
- Unix-like operating system

**`src/index.md`** - This is the home page for your site. You can have as many additional pages as you’d like, but you should always have a home page, too.
</details>

**`src/data`** - You can put [data loaders](https://observablehq.com/framework/loaders) or static data files anywhere in your source root, but we recommend putting them here.
### Running the app

To build and run the app for development, execute:

```shell
make start
```

**`src/components`** - You can put shared [JavaScript modules](https://observablehq.com/framework/javascript/imports) anywhere in your source root, but we recommend putting them here. This helps you pull code out of Markdown files and into JavaScript modules, making it easier to reuse code across pages, write tests and run linters, and even share code with vanilla web applications.
You can now access the app at <http://localhost:3000>.

**`observablehq.config.js`** - This is the [project configuration](https://observablehq.com/framework/config) file, such as the pages and sections in the sidebar navigation, and the project’s title.
## Operations

## Command reference
Once it passes CI, we deploy every commit on the `main` branch, which [Fly.io] hosts.

| Command | Description |
| -------------------- | ------------------------------------------- |
| `npm install` | Install or reinstall dependencies |
| `npm run dev` | Start local preview server |
| `npm run build` | Build your static site, generating `./dist` |
| `npm run deploy` | Deploy your project to Observable |
| `npm run clean` | Clear the local data loader cache |
| `npm run observable` | Run commands like `observable help` |
[docker]: https://www.docker.com/
[fly.io]: https://fly.io/
[gnu make]: https://www.gnu.org/software/make/
[node.js]: https://nodejs.org/
[stats.prereview.org]: https://stats.prereview.org/

0 comments on commit 3152c68

Please sign in to comment.