Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
pontusab committed Oct 12, 2024
1 parent 1572730 commit a82d04a
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 8 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
"lint": "next lint",
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@openpanel/nextjs": "^1.0.0",
Expand Down
11 changes: 8 additions & 3 deletions src/data/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ import { webDevelopmentRules } from "./rules/web-development";
import { wordpressRules } from "./rules/wordpress";
import { wordpressWoocommerce } from "./rules/wordpress-woocommerce";

interface Rule {
export interface Rule {
title: string;
slug: string;
tags: string[];
Expand Down Expand Up @@ -121,15 +121,20 @@ export const rules: Rule[] = [
...webDevelopmentRules,
...wordpressRules,
...wordpressWoocommerce,
];
].map(
(rule): Rule => ({
...rule,
libs: rule.libs || [],
}),
);

export function getSections() {
const categories = Array.from(new Set(rules.flatMap((rule) => rule.tags)));

return categories
.map((tag) => ({
tag,
rules: rules.filter((rule) => rule?.tags?.includes(tag)),
rules: rules.filter((rule) => rule.tags.includes(tag)),
}))
.sort((a, b) => b.rules.length - a.rules.length);
}
Expand Down
5 changes: 2 additions & 3 deletions src/data/rules/al.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export const ALRules = [
tags: ["AL", "Business Central"],
title: "AL Microsoft Business Central Development Cursor Rules",
slug: "al-buisnesscentral-development-cursor-rules",
libs: [],
libs: ["al", "business-central"],
content: `
You are an expert in AL, and Microsoft Business Central development.
Expand Down Expand Up @@ -69,8 +69,7 @@ https://learn.microsoft.com/ja-jp/dynamics365/business-central/dev-itpro/develop
author: {
name: "David Bulpitt",
url: "https://blog.d3developments.co.uk",
avatar:
"https://blog.d3developments.co.uk/favicon.ico",
avatar: "https://blog.d3developments.co.uk/favicon.ico",
},
},
];
2 changes: 1 addition & 1 deletion src/data/rules/django.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export const djangoRules = [
tags: ["Django", "Python", "Web Development"],
title: "Django Python Cursor Rules",
slug: "django-python-cursor-rules",
libs: [],
libs: ["django", "python"],
content: `
You are an expert in Python, Django, and scalable web application development.
Expand Down
1 change: 1 addition & 0 deletions src/data/rules/jax.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ export const jaxRules = [
tags: ["Python", "JAX", "Machine Learning"],
title: "JAX Best Practices",
slug: "jax-best-practices",
libs: ["jax", "numpy"],
content: `
You are an expert in JAX, Python, NumPy, and Machine Learning.
Expand Down

0 comments on commit a82d04a

Please sign in to comment.