Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 10 additions & 23 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,15 @@
# Welcome
---
slug: /
---

ocular is a set of tools to help build and publish open source frameworks. It contains:
- a `dev-tools` module that installs and provides base configurations for tools such as Biome, Vite, esbuild and lerna.
- a `gatsby-theme-ocular` module that contains a markdown to HTML converter to make it easy to build websites.
## About ocular-dev-tools
# vis.gl development tools
Comment thread
ibgreen marked this conversation as resolved.

ocular-dev-tools installs a set of configurable development scripts to handle build, test and publish tasks for JavaScript framework repositories.
Shared development tools for building, testing, linting, bundling, and publishing vis.gl's open source JavaScript frameworks.

While highly configurable ocular-dev-tools is very opinionated in choice of tooling etc, and mainly targets vis.gl frameworks, like deck.gl, luma.gl etc.
## Documentation

## About gatsby-theme-ocular
- [Dev tools](/docs/dev-tools) — build, test, lint, release, and migration guidance.
- [TypeScript plugins](/docs/ts-plugins/ts-transform-webgpu) — TypeScript transforms maintained by this repository.
- [Docusaurus Website](./docusaurus-website.md) — the shared documentation website package used by current vis.gl projects.

The vis.gl team needed a system to build documentation websites with the least amount of friction. Our first use case has been the websites for the various visualization projects such as [deck.gl](https://deck.gl) [luma.gl](https://luma.gl) or [loaders.gl](https://loaders.gl).

We wanted:
- to organize documentation files with a table of contents, navigation and search;
- to have interactive examples;
- to have some control on formatting;
- to generate websites discoverable by search engines;
- to make it easy to publish these websites, especially on github pages;
- to make this experience possible without writing a line of code;
- to provide sensible defaults in terms of navigation and styling;
- but to allow advanced users to overwrite and customize anything they want.

Happy documenting!

To find out more, go to [get started](get-started.md)
The documentation site is built with Docusaurus and the shared `@vis.gl/docusaurus-website` configuration.
13 changes: 13 additions & 0 deletions docs/docusaurus-website.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
title: Docusaurus Website
---

# Docusaurus Website

`@vis.gl/docusaurus-website` provides shared Docusaurus components and configuration for vis.gl's open source JavaScript frameworks.

The package supplies the common vis.gl and OpenJS branding, navigation, footer, local search, stylesheet, and webpack behavior used by project documentation sites. The implementation and tests are in [`modules/docusaurus-website`](https://github.com/visgl/dev-tools/tree/master/modules/docusaurus-website).

Project sites typically create a small `docusaurus.config.js` and call `getDocusaurusConfig` with the project name, repository URL, canonical site URL, and documentation table of contents.

This package replaces the former Gatsby-based `gatsby-theme-ocular` website tooling.
9 changes: 9 additions & 0 deletions docs/legacy-gatsby.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: Historical Gatsby documentation
---

# Historical Gatsby documentation

Earlier versions of this project included a Gatsby theme named `gatsby-theme-ocular`. That theme and its website-specific documentation are no longer part of the repository.

Current vis.gl project sites use Docusaurus with `@vis.gl/docusaurus-website`. See the [Docusaurus Website guide](./docusaurus-website.md) for the current approach.
172 changes: 5 additions & 167 deletions docs/table-of-contents.json
Original file line number Diff line number Diff line change
@@ -1,167 +1,5 @@
{
"id": "table-of-contents",
"chapters": [
{
"title": "Overview",
"entries": [
{
"entry": "docs"
}
]
},
{
"title": "ocular-dev-tools",
"chapters": [
{
"title": "Overview",
"entries": [
{
"entry": "modules/dev-tools/docs/"
},
{
"entry": "modules/dev-tools/docs/whats-new"
},
{
"entry": "modules/dev-tools/docs/upgrade-guide"
},
{
"entry": "modules/dev-tools/docs/faq"
}
]
},
{
"title": "Configuration Guide",
"entries": [
{
"entry": "modules/dev-tools/docs/"
},
{
"entry": "modules/dev-tools/docs/developer-guide/command-line-interface"
},
{
"entry": "modules/dev-tools/docs/developer-guide/configuring-tests"
},
{
"entry": "modules/dev-tools/docs/developer-guide/aliases"
}
]
},
{
"title": "Command Line Reference",
"entries": [
{
"entry": "modules/dev-tools/docs/cli/ocular-bootstrap"
},
{
"entry": "modules/dev-tools/docs/cli/ocular-build"
},
{
"entry": "modules/dev-tools/docs/cli/ocular-clean"
},
{
"entry": "modules/dev-tools/docs/cli/ocular-lint"
},
{
"entry": "modules/dev-tools/docs/cli/ocular-test"
},
{
"entry": "modules/dev-tools/docs/cli/ocular-metrics"
},
{
"entry": "modules/dev-tools/docs/cli/ocular-publish"
},
{
"entry": "modules/dev-tools/docs/cli/ocular-bump"
}
]
},
{
"title": "API Reference",
"entries": [
{
"entry": "modules/dev-tools/docs/api-reference/get-babel-config"
},
{
"entry": "modules/dev-tools/docs/api-reference/get-webpack-config"
}
]
}
]
},
{
"title": "gatsby-theme-ocular",
"chapters": [
{
"title": "Overview",
"entries": [
{
"entry": "modules/gatsby-theme-ocular/docs"
},
{
"entry": "modules/gatsby-theme-ocular/docs/get-started"
},
{
"entry": "modules/gatsby-theme-ocular/docs/whats-new"
},
{
"entry": "modules/gatsby-theme-ocular/docs/upgrade-guide"
}
]
},
{
"title": "Creating content",
"entries": [
{
"entry": "modules/gatsby-theme-ocular/docs"
},
{
"entry": "modules/gatsby-theme-ocular/docs/get-started"
},
{
"entry": "modules/gatsby-theme-ocular/docs/whats-new"
},
{
"entry": "modules/gatsby-theme-ocular/docs/upgrade-guide"
}
]
},
{
"title": "Creating content",
"entries": [
{
"entry": "modules/gatsby-theme-ocular/docs/creating-content/writing-documentation"
},
{
"entry": "modules/gatsby-theme-ocular/docs/creating-content/interactive-examples"
}
]
},
{
"title": "Developer Guide",
"entries": [
{
"entry": "modules/gatsby-theme-ocular/docs/developer-guide/configuring"
},
{
"entry": "modules/gatsby-theme-ocular/docs/developer-guide/deploying"
},
{
"entry": "modules/gatsby-theme-ocular/docs/developer-guide/debugging"
}
]
},
{
"title": "API Reference",
"entries": [
{
"entry": "modules/gatsby-theme-ocular/docs/api-reference/options"
},
{
"entry": "modules/gatsby-theme-ocular/docs/api-reference/generated-pages"
}
]
}
]
}
]
}
[
"README",
{"type": "category", "label": "Docusaurus Website", "items": ["docusaurus-website"]},
{"type": "category", "label": "Historical: Gatsby Ocular", "items": ["legacy-gatsby"]}
Comment thread
ibgreen marked this conversation as resolved.
]
20 changes: 12 additions & 8 deletions modules/dev-tools/docs/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# ocular-dev-tools
---
slug: /
---

# @vis.gl/dev-tools

Dev tools for vis.gl open source Javascript frameworks

Expand Down Expand Up @@ -55,13 +59,13 @@ After installing you can set up your build scripts in package.json as follows:

| Typical Build Script | Ocular Script | Description |
| --- | --- | --- |
| [`ocular-bootstrap`](docs/dev-tools/cli/ocular-bootstrap) | `bootstrap` | Install dependencies for monorepos |
| [`ocular-clean`](docs/dev-tools/cli/ocular-clean) | `clean` | Remove all transpiled files in preparation for a new build. |
| [`ocular-build`](docs/dev-tools/cli/ocular-build) | `build` | Transpile all modules. |
| [`ocular-lint`](docs/dev-tools/cli/ocular-lint) | `lint` | Format and lint the code base with Biome. |
| [`ocular-test`](docs/dev-tools/cli/ocular-test) | `test` | Run a named Vitest project. |
| [`ocular-metrics`](docs/dev-tools/cli/ocular-metrics) | `metrics` | Bundle the source and report the bundle size. |
| [`ocular-publish`](docs/dev-tools/cli/ocular-publish) | `publish` | Publish the packages, create git tag and push. |
| [`ocular-bootstrap`](/docs/dev-tools/cli/ocular-bootstrap) | `bootstrap` | Install dependencies for monorepos |
| [`ocular-clean`](/docs/dev-tools/cli/ocular-clean) | `clean` | Remove all transpiled files in preparation for a new build. |
| [`ocular-build`](/docs/dev-tools/cli/ocular-build) | `build` | Transpile all modules. |
| [`ocular-lint`](/docs/dev-tools/cli/ocular-lint) | `lint` | Format and lint the code base with Biome. |
| [`ocular-test`](/docs/dev-tools/cli/ocular-test) | `test` | Run a named Vitest project. |
| [`ocular-metrics`](/docs/dev-tools/cli/ocular-metrics) | `metrics` | Bundle the source and report the bundle size. |
| [`ocular-publish`](/docs/dev-tools/cli/ocular-publish) | `publish` | Publish the packages, create git tag and push. |


### Configuration
Expand Down
2 changes: 1 addition & 1 deletion modules/dev-tools/docs/cli/ocular-lint.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ ocular-lint [mode]

## Configuration

[Configurations](#ocular-dev-tools-1): `lint`
[Configuration](#configuration): `lint`

`ocular-lint` loads `biome.json` or `biome.jsonc` from the project root. If neither exists, it
uses the configuration shipped by `@vis.gl/dev-tools`.
2 changes: 1 addition & 1 deletion modules/dev-tools/docs/cli/ocular-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ Bundle the source and report the bundle size.

## Configuration

[Configurations](#ocular-dev-tools-1): `entry`
[Configuration](#configuration): `entry`
4 changes: 2 additions & 2 deletions modules/dev-tools/docs/whats-new.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# What's New

`ocular-dev-tools` release details are available in the [CHANGELOG](https://github.com/uber-web/ocular/blob/master/modules/dev-tools/CHANGELOG.md)
`@vis.gl/dev-tools` release details are available in the [CHANGELOG](https://github.com/visgl/dev-tools/blob/master/CHANGELOG.md)

### v1.0.0 (alpha)

Expand Down Expand Up @@ -49,6 +49,6 @@ information in vscode etc.

### v0.3.0

Some release details are available in the [CHANGELOG](https://github.com/uber-web/ocular/blob/master/modules/dev-tools/CHANGELOG.md)
Some release details are available in the [CHANGELOG](https://github.com/visgl/dev-tools/blob/master/CHANGELOG.md)

- `ocular-test node-debug` - New mode - starts node debugger
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@
"private": true,
"type": "module",
"workspaces": [
"modules/*"
"modules/*",
"website"
],
"scripts": {
"bootstrap": "ocular-bootstrap && npm run build",
"build": "ocular-clean && yarn workspace @vis.gl/dev-tools exec tspc -b tsconfig.json && ocular-build",
"website:build": "yarn build && yarn workspace project-website build",
"cover": "ocular-test node --coverage",
"lint": "ocular-lint",
"test": "ocular-test node headless",
Expand Down
7 changes: 2 additions & 5 deletions website/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,8 @@ jspm_packages


# Build Files
public/
.cache/

# Gatsby context
.gatsby-context.js
build/
.docusaurus/

# Bundle stats
bundle-stats.json
42 changes: 42 additions & 0 deletions website/docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
const {resolve} = require('path');
const {getDocusaurusConfig} = require('@vis.gl/docusaurus-website');

const config = getDocusaurusConfig({
projectName: 'dev-tools',
tagline: 'Shared development tools for vis.gl projects',
siteUrl: 'https://visgl.github.io/dev-tools/',
repoUrl: 'https://github.com/visgl/dev-tools',
docsTableOfContents: require('../docs/table-of-contents.json'),
search: 'local',
plugins: [
['@docusaurus/plugin-content-docs', {
id: 'dev-tools',
path: resolve(__dirname, '../modules/dev-tools/docs'),
routeBasePath: 'docs/dev-tools',
sidebarPath: resolve(__dirname, './src/sidebars/dev-tools.js'),
breadcrumbs: false,
editUrl: 'https://github.com/visgl/dev-tools/tree/master/modules/dev-tools/docs/'
}],
['@docusaurus/plugin-content-docs', {
id: 'ts-plugins',
path: resolve(__dirname, '../modules/ts-plugins/docs'),
routeBasePath: 'docs/ts-plugins',
sidebarPath: resolve(__dirname, './src/sidebars/ts-plugins.js'),
breadcrumbs: false,
editUrl: 'https://github.com/visgl/dev-tools/tree/master/modules/ts-plugins/docs/'
}],
['@docusaurus/plugin-client-redirects', {
redirects: [
{from: '/about', to: '/docs'},
{from: '/docs/ocular-dev-tools', to: '/docs/dev-tools'},
{from: '/docs/gatsby-theme-ocular', to: '/docs/legacy-gatsby'},
{from: '/ocular-dev-tools', to: '/docs/dev-tools'},
{from: '/gatsby-theme-ocular', to: '/docs/legacy-gatsby'}
]
}]
]
});

config.baseUrl = process.env.WEBSITE_BASE_URL || '/dev-tools/';

module.exports = config;
Loading
Loading