1
- Specification of the jQuery Plugins Site package .json
2
- =====================================================
1
+ Specification of the jQuery Plugins Site jquery .json
2
+ ====================================================
3
3
4
- # LIVING SPEC (heavily inspired by that of npm. Thanks isaacs)
4
+ # LIVING SPEC (heavily inspired by that of npm, thanks isaacs)
5
5
6
- This document is all you need to know about what's required in your package.json
7
- file. It must be actual JSON, not just a JavaScript object literal.
6
+ This document is all you need to know about what's required in your jquery.json
7
+ file(s). It must be actual JSON, not just a JavaScript object literal.
8
+
9
+ ** NOTE: While we refer to the file as jquery.json, the file name must actually be {name}.jquery.json.**
8
10
9
11
# Fields
10
12
@@ -15,44 +17,41 @@ file. It must be actual JSON, not just a JavaScript object literal.
15
17
* <a href =" #field-title " >title</a >
16
18
* <a href =" #field-author " >author</a >
17
19
* <a href =" #field-licenses " >licenses</a >
18
- * <a href =" #field-jquery- dependencies " >jquery. dependencies</a >
20
+ * <a href =" #field-dependencies " >dependencies</a >
19
21
20
22
## Optional Fields
21
23
22
24
* <a href =" #field-description " >description</a >
23
25
* <a href =" #field-keywords " >keywords</a >
24
26
* <a href =" #field-homepage " >homepage</a >
25
- * <a href =" #field-jquery- docs " >jquery. docs</a >
26
- * <a href =" #field-jquery- demo " >jquery. demo</a >
27
- * <a href =" #field-jquery- download " >jquery. download</a >
27
+ * <a href =" #field-docs " >docs</a >
28
+ * <a href =" #field-demo " >demo</a >
29
+ * <a href =" #field-download " >download</a >
28
30
* <a href =" #field-maintainers " >maintainers</a >
29
31
30
32
## <a name =" field-name " >name</a >
31
33
32
- The * most* important things in your package .json are the name and version fields.
34
+ The * most* important things in your jquery .json are the name and version fields.
33
35
The name and version together form an identifier that is assumed
34
36
to be completely unique. Changes to the plugin should come along with
35
37
changes to the version.
36
38
37
39
The name is what your thing is called. Some tips:
38
40
39
- * Don't put "js" in the name. It's assumed that it's js, since you're
40
- writing a package.json file.
41
- * Do put "jquery" in the name. This may seem like the opposite advice from the previous
42
- tip, but this is important for projects loading jQuery plugins and non-jQuery plugins
43
- through a module loader.
41
+ * Don't put "js" or "jquery" in the name. It's assumed that it's js and jquery, since
42
+ you're writing a jquery.json file.
44
43
* The name ends up being part of a URL. Any name with non-url-safe characters will
45
44
be rejected. The jQuery Plugins Site is UTF-8.
46
45
* The name should be short, but also reasonably descriptive.
47
46
* You may want to check [ the plugins site] ( http://plugins.jquery.com/ )
48
47
to see if there's something by that name already, before you get too attached to it.
49
48
* If you have a plugin with the same name as a plugin already in the jQuery Plugins
50
- Site, either consider renaming your plugin or namespace it. For example, jQuery UI
51
- plugins are listed with the "jquery. ui." prefix (e.g. jquery. ui.dialog, jquery. ui.autocomplete).
49
+ Site, either consider renaming your plugin or namespacing it. For example, jQuery UI
50
+ plugins are listed with the "ui." prefix (e.g. ui.dialog, ui.autocomplete).
52
51
53
52
## <a name =" field-version " >version</a >
54
53
55
- The * most* important things in your package .json are the name and version fields.
54
+ The * most* important things in your jquery .json are the name and version fields.
56
55
The name and version together form an identifier that is assumed
57
56
to be completely unique. Changes to the plugin should come along with
58
57
changes to the version. Version number must be a valid semantic version number
@@ -84,7 +83,7 @@ a url property linking to the actual text and an optional "type" property specif
84
83
}
85
84
]
86
85
87
- ## <a name =" field-jquery- dependencies " >jquery. dependencies</a >
86
+ ## <a name =" field-dependencies " >dependencies</a >
88
87
89
88
Dependencies are specified with a simple hash of package name to version
90
89
range. The version range is EITHER a string which has one or more
@@ -115,15 +114,15 @@ Keywords may only contain letters, numbers, hyphens, and dots.
115
114
116
115
The url to the plugin homepage.
117
116
118
- ## <a name =" field-jquery- docs " >jquery. docs</a >
117
+ ## <a name =" field-docs " >docs</a >
119
118
120
119
The url to the plugin documentation.
121
120
122
- ## <a name =" field-jquery- demo " >jquery. demo</a >
121
+ ## <a name =" field-demo " >demo</a >
123
122
124
123
The url to the plugin demo or demos.
125
124
126
- ## <a name =" field-jquery- download " >jquery. download</a >
125
+ ## <a name =" field-download " >download</a >
127
126
128
127
The url to download the plugin. A download URL will be automatically generated
129
128
based on the tag in GitHub, but you can specify a custom URL if you'd prefer
@@ -214,12 +213,14 @@ The following are equivalent:
214
213
You may not supply a comparator with a version containing an x. Any
215
214
digits after the first "x" are ignored.
216
215
217
- ## <a href =" sample " >Sample package.json</a >
216
+ ## <a href =" sample " >Sample jquery.json</a >
217
+
218
+ ** color.jquery.json**
218
219
219
220
``` json
220
221
{
221
- "name" : " jquery. color" ,
222
- "version" : " 2.0.0b1 " ,
222
+ "name" : " color" ,
223
+ "version" : " 2.0.0-beta.1 " ,
223
224
"title" : " jQuery.Color()" ,
224
225
"author" : {
225
226
"name" : " John Resig" ,
@@ -228,11 +229,11 @@ digits after the first "x" are ignored.
228
229
"licenses" : [
229
230
{
230
231
"type" : " MIT" ,
231
- "url" : " MIT-LICENSE.txt"
232
+ "url" : " https://github.com/jquery/jquery-color/raw/2.0.0-beta.1/ MIT-LICENSE.txt"
232
233
},
233
234
{
234
235
"type" : " GPLv2" ,
235
- "url" : " GPL-LICENSE.txt"
236
+ "url" : " https://github.com/jquery/jquery-color/raw/2.0.0-beta.1/ GPL-LICENSE.txt"
236
237
}
237
238
],
238
239
"jquery" : {
0 commit comments