forked from SchemaStore/schemastore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
component.json
139 lines (139 loc) · 4.9 KB
/
component.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
{
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": true,
"properties": {
"private": {
"description": "A boolean specifying whether the component is private, defaulting to false.",
"type": "boolean",
"default": false
},
"name": {
"description": "A public component MUST have a 'name'. This is what will be passed to require().",
"type": "string",
"pattern": "^[0-9a-z-_]+$"
},
"repo": {
"description": "The public component MUST have a 'repository' property, this is registry end-point consisting of <username>/<project> , for example 'visionmedia/page.js' or 'component/dialog'.",
"type": "string"
},
"description": {
"description": "The component SHOULD have a 'description' property. This helps people find and understand your component.",
"type": "string"
},
"version": {
"description": "The public component MUST include a version, allowing other scripts to depend on specific releases of the component.",
"type": "string"
},
"keywords": {
"description": "Keywords are used when searching for a component. A public component SHOULD list a few keywords.",
"type": "array",
"minItems": 1,
"items": {
"type": "string"
}
},
"main": {
"description": "It is recommended that you use 'index.js' for the main component file, however if you use another filename, you MUST define a 'main' field for that.",
"type": "string"
},
"scripts": {
"description": "The scripts field explicitly specifies the scripts for this component. For public components, these must be regular JavaScript files. For private components, these should be regular Javascript files.",
"type": "array",
"minItems": 1,
"items": {
"type": "string"
}
},
"styles": {
"description": "The styles field explicitly specifies the stylesheets for this component. For public components, these must be regular CSS files. For private components, these should be regular CSS files.",
"type": "array",
"minItems": 1,
"items": {
"type": "string"
}
},
"json": {
"description": "The json field explicitly specifies the JSON files for this component. Each file must be valid JSON .",
"type": "array",
"minItems": 1,
"items": {
"type": "string"
}
},
"images": {
"description": "The images field MUST be supported and fetched upon installation, this allows component build tools to rewrite stylesheet url() s in order to accomodate various file serving techniques.",
"type": "array",
"minItems": 1,
"items": {
"type": "string"
}
},
"fonts": {
"description": "The fonts field MUST be supported and fetched upon installation, this allows component build tools to rewrite stylesheet url() s in order to accomodate various file serving techniques.",
"type": "array",
"minItems": 1,
"items": {
"type": "string"
}
},
"files": {
"description": "In the future we will classify more file types, however for those which are not treated uniquely such as fonts may be placed in a files array to aid build and installation tools.",
"type": "array",
"minItems": 1,
"items": {
"type": "string"
}
},
"dependencies": {
"description": "Runtime dependencies.",
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"locals": {
"description": "Local dependencies are already located on disk, these are not installed, but are however included in the builds, thus no versions need to be defined. Local components should be located in a directory specified within .paths.",
"type": "array",
"minItems": 1,
"items": {
"type": "string"
}
},
"remotes": {
"description": "The public component must not contain any remotes.",
"type": "array",
"minItems": 1,
"items": {
"type": "string"
}
},
"paths": {
"description": "The public component must not contain any paths.",
"type": "array",
"minItems": 1,
"items": {
"type": "string"
}
},
"templates": {
"description": "The templates array MUST provide the contents of each file as a require-able module. For example the following must provide the HTML string via require('user.html').",
"type": "array",
"minItems": 1,
"items": {
"type": "string"
}
},
"demo": {
"type": "string"
},
"development": {
"$ref": "#"
},
"license": {
"description": "The license string such as 'MIT' may be used for search output and other reporting, developers SHOULD specify this field",
"type": "string"
}
},
"title": "JSON schema for component.json files",
"type": "object"
}