Skip to content

Commit

Permalink
chore: convert to monorepo with konami-emoji-blast
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaKGoldberg committed Mar 29, 2024
1 parent 1f3d164 commit 1c80278
Show file tree
Hide file tree
Showing 81 changed files with 4,290 additions and 2,925 deletions.
28 changes: 17 additions & 11 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,15 @@ module.exports = {
extends: [
"eslint:recommended",
"plugin:eslint-comments/recommended",
"plugin:n/recommended",
"plugin:perfectionist/recommended-natural",
"plugin:regexp/recommended",
"plugin:vitest/recommended",
],
ignorePatterns: [
"!.*",
"coverage",
"dist",
"lib",
"**/dist",
"**/lib",
"node_modules",
"pnpm-lock.yaml",
],
Expand All @@ -32,7 +31,7 @@ module.exports = {
"plugin:@typescript-eslint/strict",
"plugin:@typescript-eslint/stylistic",
],
files: ["**/*.ts"],
files: ["**/*.{ts,tsx}"],
parser: "@typescript-eslint/parser",
rules: {
// These off-by-default rules work well for this repo and we like them on.
Expand All @@ -49,19 +48,20 @@ module.exports = {
"jsdoc/require-param": "off",
"jsdoc/require-property": "off",
"jsdoc/require-returns": "off",
"n/no-missing-import": "off",
},
},
{
excludedFiles: ["**/*.md/*.ts"],
excludedFiles: ["**/*.md/*.{ts,tsx}"],
extends: [
"plugin:@typescript-eslint/strict-type-checked",
"plugin:@typescript-eslint/stylistic-type-checked",
],
files: ["**/*.ts"],
files: ["**/*.{ts,tsx}"],
parser: "@typescript-eslint/parser",
parserOptions: {
project: "./tsconfig.eslint.json",
// Blocked from EXPERIMENTAL_useProjectService on:
// https://github.com/typescript-eslint/typescript-eslint/issues/8206
project: ["./**/tsconfig.eslint.json", "./**/tsconfig.json"],
},
rules: {
// These off-by-default rules work well for this repo and we like them on.
Expand All @@ -77,7 +77,7 @@ module.exports = {
},
},
{
excludedFiles: ["package.json"],
excludedFiles: ["**/package.json"],
extends: ["plugin:jsonc/recommended-with-json"],
files: ["*.json", "*.jsonc"],
parser: "jsonc-eslint-parser",
Expand All @@ -97,9 +97,16 @@ module.exports = {
files: ["package.json"],
parser: "jsonc-eslint-parser",
plugins: ["package-json"],
rules: {
// https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/issues/250
"package-json/valid-package-def": "off",

// https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/issues/252
"package-json/valid-repository-directory": "off",
},
},
{
files: "**/*.test.ts",
files: "**/*.test.{ts,tsx}",
rules: {
// These on-by-default rules aren't useful in test files.
"@typescript-eslint/no-unsafe-assignment": "off",
Expand All @@ -111,7 +118,6 @@ module.exports = {
files: ["**/*.{yml,yaml}"],
parser: "yaml-eslint-parser",
rules: {
"yml/file-extension": ["error", { extension: "yml" }],
"yml/sort-keys": [
"error",
{
Expand Down
40 changes: 14 additions & 26 deletions .github/DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,37 +11,35 @@ pnpm install
> This repository includes a list of suggested VS Code extensions.
> It's a good idea to use [VS Code](https://code.visualstudio.com) and accept its suggestion to install them, as they'll help with development.
## Building
## Building (Types)

Run tsup locally to build source files from `src/` into output files in `lib/`:
Run [TypeScript](https://typescriptlang.org) to build each project's files from its `src/` directory into output files in its `lib/` directory:

```shell
pnpm build
pnpm tsc
```

Add `--watch` to run the builder in a watch mode that continuously cleans and recreates `lib/` as you save files:
Add `--watch` to run the builder in a watch mode that continuously rebuilds as you save files:

```shell
pnpm build --watch
pnpm tsc --watch
```

### Building Demos
You should also see suggestions from TypeScript in your editor.

A set of `.html` files exists under `demo/` with a different way of showing off `emoji-blast` features.
Each corresponds to a Webpack ["entry point"](https://webpack.js.org/concepts/entry-points) under under the same name.
### Individual Packages

Run [**webpack**](https://webpack.js.org) locally to build source files from `src/` into output files in `dist/`:
Note that some individual packages also have their own `build` command.
Each package `build` runs [webpack](https://webpack.js.org) to build source files from `src/` into output files in `dist/`.

```shell
pnpm build:dist
```

Add `--watch` to run the builder in a watch mode:
You can run them all from the root with:

```shell
pnpm build:dist --watch
pnpm build:all
```

See each package's `.github/DEVELOPMENT.md` for per-package building instructions.

## Formatting

[Prettier](https://prettier.io) is used to format code.
Expand All @@ -67,7 +65,7 @@ Each should be shown in VS Code, and can be run manually on the command-line:
## Testing

[Vitest](https://vitest.dev) is used for tests.
You can run it locally on the command-line:
You can run it on the command-line:

```shell
pnpm run test
Expand All @@ -83,13 +81,3 @@ pnpm run test --coverage

This repository includes a [VS Code launch configuration](https://code.visualstudio.com/docs/editor/debugging) for debugging unit tests.
To launch it, open a test file, then run _Debug Current Test File_ from the VS Code Debug panel (or press F5).

## Type Checking

Run [TypeScript](https://typescriptlang.org) locally to type check files in `src/`:

```shell
pnpm tsc --watch
```

You should also see suggestions from TypeScript in your editor.
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/prepare
- run: pnpm build:dist
- run: pnpm build:all
- run: for file in ./packages/*/lib/index.js; do node $file; done

name: Build Dist
name: Build All

on:
pull_request: ~
Expand Down
16 changes: 0 additions & 16 deletions .github/workflows/build.yml

This file was deleted.

27 changes: 0 additions & 27 deletions .github/workflows/post-release.yml

This file was deleted.

29 changes: 0 additions & 29 deletions .github/workflows/release.yml

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ coverage/
dist/
lib/
node_modules/
tsconfig.tsbuildinfo
18 changes: 0 additions & 18 deletions .release-it.json

This file was deleted.

Loading

0 comments on commit 1c80278

Please sign in to comment.