mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Update deps
This commit is contained in:
parent
e3f8ec505b
commit
8622b75b29
@ -1,7 +1,6 @@
|
||||
import { defineConfig } from "astro/config";
|
||||
import starlight from "@astrojs/starlight";
|
||||
|
||||
import sitemap from "@astrojs/sitemap";
|
||||
import { generateSchema } from "./src/schema_generator";
|
||||
|
||||
generateSchema("body_schema.json");
|
||||
|
||||
@ -7,20 +7,21 @@
|
||||
"start": "astro dev",
|
||||
"build": "astro build",
|
||||
"preview": "astro preview",
|
||||
"astro": "astro"
|
||||
"astro": "astro",
|
||||
"format": "prettier --write ."
|
||||
},
|
||||
"dependencies": {
|
||||
"@astrojs/starlight": "^0.5.2",
|
||||
"astro": "2.7.0",
|
||||
"sharp": "^0.32.1"
|
||||
"@astrojs/starlight": "^0.13.1",
|
||||
"astro": "3.6.1",
|
||||
"sharp": "^0.32.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@apidevtools/json-schema-ref-parser": "^10.1.0",
|
||||
"eslint": "^8.45.0",
|
||||
"eslint-plugin-prettier": "^5.0.0",
|
||||
"fast-xml-parser": "^4.2.5",
|
||||
"prettier": "^3.0.0",
|
||||
"prettier-plugin-astro": "^0.11.0",
|
||||
"@apidevtools/json-schema-ref-parser": "^11.1.0",
|
||||
"eslint": "^8.54.0",
|
||||
"eslint-plugin-prettier": "^5.0.1",
|
||||
"fast-xml-parser": "^4.3.2",
|
||||
"prettier": "^3.1.0",
|
||||
"prettier-plugin-astro": "^0.12.2",
|
||||
"xml-js": "^1.6.11"
|
||||
}
|
||||
}
|
||||
5762
docs/pnpm-lock.yaml
generated
5762
docs/pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,7 @@
|
||||
import { defineCollection } from 'astro:content';
|
||||
import { docsSchema, i18nSchema } from '@astrojs/starlight/schema';
|
||||
import { defineCollection } from "astro:content";
|
||||
import { docsSchema, i18nSchema } from "@astrojs/starlight/schema";
|
||||
|
||||
export const collections = {
|
||||
docs: defineCollection({ schema: docsSchema() }),
|
||||
i18n: defineCollection({ type: 'data', schema: i18nSchema() }),
|
||||
i18n: defineCollection({ type: "data", schema: i18nSchema() })
|
||||
};
|
||||
|
||||
@ -26,20 +26,18 @@ by Mobius Digital.
|
||||
|
||||
<CardGrid stagger>
|
||||
<Card title="Create Planets Through JSON" icon="document">
|
||||
Use declarative JSON to create custom planets without having to write a line
|
||||
of code.
|
||||
Use declarative JSON to create custom planets without having to write a line of code.
|
||||
</Card>
|
||||
<Card title="Custom Star Systems" icon="star">
|
||||
Create solar systems seperate from the base game's with its own planets,
|
||||
vessel coordinates, and ship log.
|
||||
Create solar systems seperate from the base game's with its own planets, vessel coordinates,
|
||||
and ship log.
|
||||
</Card>
|
||||
<Card title="API" icon="forward-slash">
|
||||
Interface with various life cycle events and functions during star system
|
||||
creation with New Horizon's API.
|
||||
Interface with various life cycle events and functions during star system creation with New
|
||||
Horizon's API.
|
||||
</Card>
|
||||
<Card title="Extendable Configs" icon="puzzle">
|
||||
Use the `extras` key in JSON files to allow extendable functionality with
|
||||
other mods.
|
||||
Use the `extras` key in JSON files to allow extendable functionality with other mods.
|
||||
</Card>
|
||||
</CardGrid>
|
||||
|
||||
|
||||
@ -8,6 +8,7 @@ description: API reference for New Horizons
|
||||
Put this in a C# file somewhere in your mod:
|
||||
|
||||
<!-- Auto update this would be cool -->
|
||||
|
||||
```cs
|
||||
public interface INewHorizons
|
||||
{
|
||||
|
||||
2
docs/src/env.d.ts
vendored
2
docs/src/env.d.ts
vendored
@ -1,2 +1,2 @@
|
||||
/// <reference path="../.astro/types.d.ts" />
|
||||
/// <reference types="astro/client-image" />
|
||||
/// <reference types="astro/client" />
|
||||
|
||||
@ -1,19 +1,17 @@
|
||||
import { Schema, SchemaTools } from "./schema_utils";
|
||||
import * as fs from "node:fs";
|
||||
|
||||
|
||||
const addFrontmatter = (content: string, frontmatter: Record<string, boolean | string>) => {
|
||||
const entries = Object.entries(frontmatter).map(([key, value]) => `${key}: ${value}`)
|
||||
const entries = Object.entries(frontmatter).map(([key, value]) => `${key}: ${value}`);
|
||||
|
||||
if (entries.length === 0) {
|
||||
return content
|
||||
return content;
|
||||
}
|
||||
|
||||
return `---\n${entries.join('\n')}\n---\n\n${content}`
|
||||
}
|
||||
return `---\n${entries.join("\n")}\n---\n\n${content}`;
|
||||
};
|
||||
|
||||
export const generateSchema = (fileName: string) => {
|
||||
|
||||
const schema = SchemaTools.readSchema(fileName);
|
||||
|
||||
const dir = `src/content/docs/schemas/${schema.slug}`;
|
||||
@ -28,8 +26,7 @@ export const generateSchema = (fileName: string) => {
|
||||
editUrl: false
|
||||
};
|
||||
|
||||
const content = `import Schema from "/src/components/Schemas/Schema.astro";\n\n<Schema fileName="${schema.fileName}" />\n`
|
||||
|
||||
fs.writeFileSync(`${dir}/index.mdx`, addFrontmatter(content, frontMatter))
|
||||
const content = `import Schema from "/src/components/Schemas/Schema.astro";\n\n<Schema fileName="${schema.fileName}" />\n`;
|
||||
|
||||
fs.writeFileSync(`${dir}/index.mdx`, addFrontmatter(content, frontMatter));
|
||||
};
|
||||
|
||||
@ -167,7 +167,7 @@ export const SchemaTools = {
|
||||
type: "JSON",
|
||||
val: { title: key, ...val }
|
||||
}
|
||||
} as Schema)
|
||||
}) as Schema
|
||||
);
|
||||
case "XML":
|
||||
let node = schema.internalSchema.val;
|
||||
@ -190,7 +190,7 @@ export const SchemaTools = {
|
||||
type: "XML",
|
||||
val: d
|
||||
}
|
||||
} as Schema)
|
||||
}) as Schema
|
||||
);
|
||||
} else {
|
||||
return [];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user