From e6da6efc28e7148e3d7df4ff9d6b596cc07a66e4 Mon Sep 17 00:00:00 2001 From: mannix-lei Date: Thu, 25 May 2023 15:27:28 +0800 Subject: [PATCH] feat: add package name --- README.md | 1 + examples/simple-element.json | 3 ++- schema.d.ts | 5 +++++ schema.json | 3 +++ 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9ed2175..78b07a8 100644 --- a/README.md +++ b/README.md @@ -75,6 +75,7 @@ The manifest would look like: `my-project/custom-elements.json`: ```json { + "name": "my-element", "schemaVersion": "2.0.0", "readme": "README.md", "modules": [ diff --git a/examples/simple-element.json b/examples/simple-element.json index c7500ee..66b35cd 100644 --- a/examples/simple-element.json +++ b/examples/simple-element.json @@ -57,5 +57,6 @@ } ] } - ] + ], + "name": "my-element" } diff --git a/schema.d.ts b/schema.d.ts index 3ad53ae..c28c902 100644 --- a/schema.d.ts +++ b/schema.d.ts @@ -22,6 +22,11 @@ * canonical export that should be used. */ export interface Package { + /** + * The name of the schema, it's best to be unique. + */ + name?: string; + /** * The version of the schema used in this file. */ diff --git a/schema.json b/schema.json index c533341..8cf2bd0 100644 --- a/schema.json +++ b/schema.json @@ -1088,6 +1088,9 @@ "schemaVersion": { "description": "The version of the schema used in this file.", "type": "string" + }, + "name": { + "description": "The name of the schema." } }, "required": [