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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 0 additions & 5 deletions .markdownlint.json

This file was deleted.

12 changes: 1 addition & 11 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
{
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"json",
"jsonc",
"json5",
"yaml"
]
}
}
3 changes: 2 additions & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ representative at an online or offline event.

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
[INSERT CONTACT METHOD].

INSERT CONTACT METHOD.
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
Expand Down
8 changes: 4 additions & 4 deletions apps/website/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
module.exports = {
rules: {
'@typescript-eslint/no-require-imports': 'off',
'ts/no-require-imports': 'off',
/// FIXME: Start
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'ts/no-unsafe-assignment': 'off',
'ts/no-var-requires': 'off',
'ts/no-unsafe-member-access': 'off',
// End
'global-require': 'off',
'unicorn/prefer-module': 'off',
Expand Down
18 changes: 9 additions & 9 deletions apps/website/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,39 @@

This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.

### Installation
## Installation

```
```sh
$ pnpm install
```

### Local Development
## Local Development

```
```sh
$ pnpm start
```

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

### Build
## Build

```
```sh
$ pnpm build
```

This command generates static content into the `build` directory and can be served using any static contents hosting service.

### Deployment
## Deployment

Using SSH:

```
```sh
$ USE_SSH=true pnpm deploy
```

Not using SSH:

```
```sh
$ GIT_USER=<Your GitHub username> pnpm deploy
```

Expand Down
8 changes: 6 additions & 2 deletions apps/website/blog/2021-08-26-welcome/index.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
---
slug: welcome
title: Welcome
authors: [jpolo]
tags: [facebook, hello, docusaurus]
authors:
- jpolo
tags:
- facebook
- hello
- docusaurus
---

[Docusaurus blogging features](https://docusaurus.io/docs/blog) are powered by the [blog plugin](https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-content-blog).
Expand Down
14 changes: 5 additions & 9 deletions apps/website/docusaurus.config.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/* eslint-disable @typescript-eslint/no-unsafe-call */
import type { Config } from '@docusaurus/types';
import type * as Preset from '@docusaurus/preset-classic';
import fs from 'node:fs';
import type typedocPluginFunction from 'docusaurus-plugin-typedoc-api';
import { fileURLToPath } from 'node:url';
import { themes } from 'prism-react-renderer';
import packageJSON from './package.json';

type TypedocPluginOptions = Parameters<typeof typedocPluginFunction>[1];
Expand All @@ -15,32 +15,28 @@ export interface CustomFields {

const fileExists = (path: fs.PathLike) => {
try {
// eslint-disable-next-line n/no-sync
fs.accessSync(path, fs.constants.F_OK);
return true;
} catch {
return false;
}
};

const { themes } = require('prism-react-renderer');

const lightTheme = themes.github;
const darkTheme = themes.dracula;

const projectRoot = fileURLToPath(new URL('../..', import.meta.url));

const githubHref = packageJSON.repository.url.replace('git@github.com:', 'https://github.com/');
// eslint-disable-next-line n/no-sync

const packageList = fs
.readdirSync(`${projectRoot}/packages`)
.map((entry) => {
const path = `packages/${entry}`;
const hasTesting = fileExists(`${projectRoot}/${path}/src/testing.ts`);
return {
path,
// eslint-disable-next-line import/no-dynamic-require
package: require(`${projectRoot}/packages/${entry}/package.json`),
package: JSON.parse(fs.readFileSync(`${projectRoot}/packages/${entry}/package.json`, 'utf8')),
entry: {
index: { path: 'src/index.ts', label: undefined as unknown as string },
...(hasTesting ? { testing: { path: 'src/Testing.ts', label: 'Testing utilities' } } : undefined),
Expand Down Expand Up @@ -95,7 +91,7 @@ const config: Config = (() => {
'classic',
{
docs: {
sidebarPath: require.resolve('./sidebars.js'),
sidebarPath: fileURLToPath(new URL('sidebars.js', import.meta.url)),
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
editUrl: `${githubHref}/tree/main/apps/website/`,
Expand All @@ -107,7 +103,7 @@ const config: Config = (() => {
editUrl: `${githubHref}/tree/main/apps/website/blog/`,
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
customCss: fileURLToPath(new URL('src/css/custom.css', import.meta.url)),
},
} satisfies Preset.Options,
],
Expand Down
2 changes: 1 addition & 1 deletion apps/website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"format": "pnpm run \"/^format:.*/\"",
"format:src": "eslint . --fix --ext=mjs,cjs,js,jsx,ts,tsx,json,jsonc,json5,yml,yaml",
"lint": "pnpm run \"/^lint:.*/\"",
"lint:src": "eslint . --ext=mjs,cjs,js,jsx,ts,tsx,json,jsonc,json5,yml,yaml",
"lint:src": "eslint .",
"serve": "docusaurus serve",
"spellcheck": "cspell --no-progress '**'",
"start": "docusaurus start",
Expand Down
15 changes: 8 additions & 7 deletions apps/website/sidebars.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/**
* Creating a sidebar enables you to:
- create an ordered group of docs
- render a sidebar for each doc of that group
- provide next/previous navigation

The sidebars can be generated from the filesystem, or explicitly defined here.

Create as many sidebars as you want.
* - create an ordered group of docs
* - render a sidebar for each doc of that group
* - provide next/previous navigation
*
* The sidebars can be generated from the filesystem, or explicitly defined here.
*
* Create as many sidebars as you want.
*/

// @ts-check
Expand All @@ -30,4 +30,5 @@ const sidebars = {
*/
};

// eslint-disable-next-line unicorn/prefer-module -- CommonJS export required by Docusaurus.
module.exports = sidebars;
96 changes: 73 additions & 23 deletions apps/website/src/components/HomepageFeatures/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ import React from 'react';
import clsx from 'clsx';
import styles from './styles.module.css';
import { Def } from '../Def';
import Stripes from '@site/static/img/stripes.svg';
import Circle from '@site/static/img/circle.svg';
import Infinity from '@site/static/img/infinity.svg';
import Jewel from '@site/static/img/jewel.svg';
import Feather from '@site/static/img/feather.svg';

type FeatureItem = {
title: string;
Expand All @@ -12,72 +17,117 @@ type FeatureItem = {
const FeatureList: FeatureItem[] = [
{
title: 'Standardized',
Svg: require('@site/static/img/stripes.svg').default,
Svg: Stripes,
description: (
<>
Standardized code and conventions for high productivity <br />
Standardized code and conventions for high productivity
{' '}
<br />
<em>
βœ“ Inspired by industry-grade technologies (Rust, Ocaml) <br />
βœ“ Self explanatory names, (almost) no abbreviations <br />
βœ“ Smooth tool integration and testability <br />
βœ“ Inspired by industry-grade technologies (Rust, Ocaml)
{' '}
<br />
βœ“ Self explanatory names, (almost) no abbreviations
{' '}
<br />
βœ“ Smooth tool integration and testability
{' '}
<br />
</em>
</>
),
},
{
title: 'Simple',
Svg: require('@site/static/img/circle.svg').default,
Svg: Circle,
description: (
<>
Functional programming, done simple. <br />
Functional programming, done simple.
{' '}
<br />
<em>
βœ“ No OOP : Plain Javascript object <br />βœ“ Pragmatic <Def>FP</Def> : pure but never obscure <br />
βœ“ Explicit and deterministic API <br />
βœ“ No OOP : Plain Javascript object
{' '}
<br />
βœ“ Pragmatic
{' '}
<Def>FP</Def>
{' '}
: pure but never obscure
{' '}
<br />
βœ“ Explicit and deterministic API
{' '}
<br />
</em>
</>
),
},
{
title: 'Stable',
Svg: require('@site/static/img/infinity.svg').default,
Svg: Infinity,
description: (
<>
Fight framework obsolescence ! <br />
Fight framework obsolescence !
{' '}
<br />
<em>
βœ“ Loose coupling between packages <br />
βœ“ Designed for maintainable applications <br />
βœ“ Harmonize frontend/backend practices <br />
βœ“ Loose coupling between packages
{' '}
<br />
βœ“ Designed for maintainable applications
{' '}
<br />
βœ“ Harmonize frontend/backend practices
{' '}
<br />
</em>
</>
),
},
{
title: 'Safe',
Svg: require('@site/static/img/jewel.svg').default,
Svg: Jewel,
description: (
<>
One ambitious goal : 0 bug in production <br />
One ambitious goal : 0 bug in production
{' '}
<br />
<em>
βœ“ Strict and type safe <br />
βœ“ Battle tested <br />
βœ“ No external NPM runtime dependencies <br />
βœ“ Strict and type safe
{' '}
<br />
βœ“ Battle tested
{' '}
<br />
βœ“ No external NPM runtime dependencies
{' '}
<br />
</em>
</>
),
},
{
title: 'Slim',
Svg: require('@site/static/img/feather.svg').default,
Svg: Feather,
description: (
<>
Because CI performances and environment matters <br />
Because CI performances and environment matters
{' '}
<br />
<em>
βœ“ Lean yet highly composable API <br />βœ“ Low bundle size enforced by{' '}
βœ“ Lean yet highly composable API
{' '}
<br />
βœ“ Low bundle size enforced by
{' '}
<a href="https://www.npmjs.com/package/size-limit" target="size-limit">
size-limit
</a>
<br />
βœ“ No constraint to use all `@w5s` packages, pick only the needed ones. <br />
βœ“ No constraint to use all `@w5s` packages, pick only the needed ones.
{' '}
<br />
</em>
</>
),
Expand Down
22 changes: 13 additions & 9 deletions apps/website/src/components/PackageBadgeGroup/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export type BadgeStyle = 'flat' | 'flat-square' | 'plastic' | 'for-the-badge' |
export type BadgeType = 'bundle-size' | 'npm-version' | 'npm-license';

const renderBadge = (
// eslint-disable-next-line @typescript-eslint/no-unused-vars
// eslint-disable-next-line ts/no-unused-vars
{ siteConfig }: ReturnType<typeof useDocusaurusContext>,
props: PackageBadgeGroupProps,
badgeProps: {
Expand Down Expand Up @@ -66,14 +66,18 @@ export function PackageBadgeGroup(props: PackageBadgeGroupProps) {
const { siteConfig } = docusaurusContext;
return (
<>
{props.apiHref == null ? null : (
<Link
className={styles.apiLink}
to={`${siteConfig.url}${siteConfig.baseUrl.replace(/\/$/, '')}${props.apiHref}`}
>
API <IconExternalLink />
</Link>
)}
{props.apiHref == null
? null
: (
<Link
className={styles.apiLink}
to={`${siteConfig.url}${siteConfig.baseUrl.replace(/\/$/, '')}${props.apiHref}`}
>
API
{' '}
<IconExternalLink />
</Link>
)}
{(['npm-version', 'npm-license', 'bundle-size'] as const).map((badgeType) =>
renderBadge(docusaurusContext, props, { badgeType }),
)}
Expand Down
Loading