Skip to content

Commit d32e46c

Browse files
authored
Chrome extension to mark every problem as easy (#434)
1 parent a853001 commit d32e46c

File tree

21 files changed

+268
-5
lines changed

21 files changed

+268
-5
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"workspaces/generate-health-report",
1515
"workspaces/javascript-leetcode-month",
1616
"workspaces/leetcode-api",
17+
"workspaces/leetcode-zen-mode",
1718
"workspaces/post-leetcode-potd-to-discord",
1819
"workspaces/repository-scripts",
1920
"workspaces/util"

workspaces/chrome-extension-hello-world/webpack.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import path from "node:path";
22

33
import type { Configuration } from "webpack";
44

5-
import packageJson from "./package.json" with { type: "module" };
5+
import packageJson from "./package.json" with { type: "json" };
66

77
const config: Configuration = {
88
target: "web",

workspaces/download-leetcode-submissions/webpack.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import webpack, {
99
import { stripPrefix } from "@code-chronicles/util/stripPrefix";
1010
import { stripPrefixOrThrow } from "@code-chronicles/util/stripPrefixOrThrow";
1111

12-
import packageJson from "./package.json" with { type: "module" };
12+
import packageJson from "./package.json" with { type: "json" };
1313

1414
const config: Configuration = {
1515
target: "node",

workspaces/fetch-leetcode-problem-list/webpack.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import webpack, {
99
import { stripPrefix } from "@code-chronicles/util/stripPrefix";
1010
import { stripPrefixOrThrow } from "@code-chronicles/util/stripPrefixOrThrow";
1111

12-
import packageJson from "./package.json" with { type: "module" };
12+
import packageJson from "./package.json" with { type: "json" };
1313

1414
const config: Configuration = {
1515
target: "node",

workspaces/fetch-recent-accepted-leetcode-submissions/webpack.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import webpack, {
99
import { stripPrefix } from "@code-chronicles/util/stripPrefix";
1010
import { stripPrefixOrThrow } from "@code-chronicles/util/stripPrefixOrThrow";
1111

12-
import packageJson from "./package.json" with { type: "module" };
12+
import packageJson from "./package.json" with { type: "json" };
1313

1414
const config: Configuration = {
1515
target: "node",

workspaces/generate-health-report/src/main.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ const COMMANDS = [
1717
"yarn workspace @code-chronicles/fetch-leetcode-problem-list build",
1818
"yarn workspace @code-chronicles/fetch-recent-accepted-leetcode-submissions build",
1919
"yarn workspace @code-chronicles/leetcode-api validate-graphql-schema",
20+
"yarn workspace @code-chronicles/leetcode-zen-mode build",
2021
"yarn workspace @code-chronicles/post-leetcode-potd-to-discord build",
2122
];
2223

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
dist/
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# @code-chronicles/leetcode-zen-mode
2+
3+
Chrome extension that makes every LeetCode problem feel easy!
4+
5+
To use:
6+
7+
1. **Build the extension:**
8+
9+
```sh
10+
# It's easiest to do this from the package's directory:
11+
cd workspaces/leetcode-zen-mode
12+
13+
# Install dependencies, if you haven't already:
14+
yarn
15+
16+
# Build the extension:
17+
yarn build
18+
```
19+
20+
2. **Load the extension into Chrome.** The built extension will be in a directory named `dist`. You will have to load it as an "unpacked extension", using Developer mode. See [the official tutorial](https://developer.chrome.com/docs/extensions/get-started/tutorial/hello-world#load-unpacked).
21+
22+
## Development
23+
24+
Like the rest of the [Code Chronicles Leetcode ecosystem](../../), this package is structured as a Node module, using [Yarn](https://yarnpkg.com/) as the package manager.
25+
26+
You can install dependencies by running `yarn`, either in this package's directory, or in the repository root. The usual `yarn format`, `yarn lint`, and `yarn typecheck` scripts are available to aid in development and occasionally to annoy. Read more in the repository's general [development guide](../../DEVELOPMENT.md).
27+
28+
This package supports an additional `package.json` script:
29+
30+
### `yarn build`
31+
32+
Builds (an unpacked version of) the extension, in a `dist` directory within the package's workspace.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import config from "@code-chronicles/eslint-config";
2+
3+
export default [...config, { ignores: ["dist/"] }];
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"name": "@code-chronicles/leetcode-zen-mode",
3+
"description": "TODO: add a nice description",
4+
"version": "0.0.1",
5+
"license": "MIT",
6+
"private": false,
7+
"repository": {
8+
"type": "git",
9+
"url": "https://github.com/code-chronicles-code/leetcode-curriculum.git",
10+
"directory": "workspaces/leetcode-zen-mode"
11+
},
12+
"author": {
13+
"name": "Miorel-Lucian Palii",
14+
"url": "https://github.com/miorel"
15+
},
16+
"type": "module",
17+
"exports": "./src/extension/main.ts",
18+
"scripts": {
19+
"build": "tsx src/scripts/writeManifest.ts && cross-env NODE_OPTIONS=\"--import tsx\" webpack",
20+
"format": "prettier --color --write .",
21+
"lint": "eslint --color --max-warnings=0 .",
22+
"typecheck": "tsc --pretty --project ."
23+
},
24+
"dependencies": {
25+
"@code-chronicles/util": "workspace:*"
26+
},
27+
"devDependencies": {
28+
"@code-chronicles/eslint-config": "workspace:*",
29+
"@types/node": "22.5.5",
30+
"cross-env": "7.0.3",
31+
"eslint": "9.11.0",
32+
"prettier": "3.3.3",
33+
"ts-loader": "9.5.1",
34+
"tsx": "4.19.1",
35+
"typescript": "5.6.2",
36+
"webpack": "5.94.0",
37+
"webpack-cli": "5.1.4"
38+
}
39+
}

0 commit comments

Comments
 (0)