Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

simple latex block #818

Closed
wants to merge 14 commits into from
Prev Previous commit
Next Next commit
fix: gen in windows
  • Loading branch information
jkcs committed Jun 6, 2024
commit 385bb126ba000cde6a0f0df8a12f7a80f00ab200
2 changes: 1 addition & 1 deletion examples/05-custom-schema/05-latex-block/.bnexample.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"playground": true,
"docs": false,
"author": "matthewlipski",
"author": "jkcs",
"tags": ["Intermediate", "LaTex", "Custom Schemas"]
}
6 changes: 5 additions & 1 deletion packages/dev-scripts/examples/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,11 @@ export function getProjectFiles(project: Project): Files {
*/
export function getExampleProjects(): Project[] {
const examples: Project[] = glob
.globSync(path.join(dir, "../../../examples/**/*/.bnexample.json").replace(/\\/g, "/"))
.globSync(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose this is needed for windows?

Cleaner might be: path .join(dir, "..","..","..","examples","**",".*","..bnexample.json")?

path
.join(dir, "../../../examples/**/*/.bnexample.json")
.replace(/\\/g, "/")
)
.map((configPath) => {
const config = JSON.parse(fs.readFileSync(configPath, "utf-8"));
const directory = path.dirname(configPath);
Expand Down
12 changes: 4 additions & 8 deletions playground/src/examples.gen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -696,17 +696,13 @@
"pathFromRoot": "examples/05-custom-schema/05-latex-block",
"config": {
"playground": true,
"docs": true,
"author": "matthewlipski",
"docs": false,
"author": "jkcs",
"tags": [
"Intermediate",
"Blocks",
"LaTex",
"Custom Schemas"
],
"dependencies": {
"@mantine/core": "^7.7.1",
"react-icons": "^5.2.1"
}
]
},
"title": "LaTex Block",
"group": {
Expand Down