-
Notifications
You must be signed in to change notification settings - Fork 27
/
README
109 lines (77 loc) · 3.78 KB
/
README
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
-------------------------------------------------------------------------------
Dojo Demos - used on demos.dojotoolkit.org
-------------------------------------------------------------------------------
Project state: varies.
-------------------------------------------------------------------------------
Project description
Demos which show off all of Dojo, potentially including a server-side
component. Each demo resides in a sub-directory. Demos should not depend on
other demos for code, but may depend on things in the top-level resources
directory or in dojo, dijit, dojox, and util namespaces.
These demos are not included in releases, and unlike tests inside of Dijit,
they may depend on DojoX components or not be fully accessible, etc.
Additionally, icons, images, and other resources not licensable for use in
the mainline toolkit may be included in the demos/ directory so long as
their license status is noted in demo-specific LICENSE files.
Server-side components are recommended to be written in PHP 5 and may use
the Zend Framework should a MVC framework be required for a particular
demo.
-------------------------------------------------------------------------------
Dependencies:
Dojo Core
Dijit
DojoX
-------------------------------------------------------------------------------
Submission Instructions
All these demos follow a simple pattern. Each demo has a "name", which
is the name of the folder it lives in. eg:
demos/myDemo/
The root demo filename is to be named `demo.html`. It should include a
<script> tag pointing to ../../dojo/dojo.js, and a src.js "layer" as a
sibling to `demo.html` .Styles should be external and located
in a file `demo.css`. A README file (similar to this document) should
also be present.
The most basic of demos should look like:
demos/myDemo/
demo.html
demo.css
src.js
If multiple modules are needed, they should appear in a /src/ folder, making
src.js a rollup, only requiring other modules.
demos/myDemo/
src.js
src/
Module.js
Proper dojo.provide calls for the src.js and Module.js files should be issued:
dojo.provide("demos.myDemo.src.Module");
About the README
The README format is a slightly-fragile custom format, which follows the
same design as this one. The second and last lines are parsed off for meta
information.
Line 2 should be a hyphen separated description:
1. --------------------------------------------------
2. Short Title - Longer Description about the purpose
3. --------------------------------------------------
The last line should be made up of @tag:value pairs. These tags can be
arbitrary, and some go unused (though may be implemented at a later
date). The most important tag is @rank, providing a way to weight
the demo in the index at http://demos.dojotoolkit.org
@rank:-999 will mark the demo as experimental, and not complete.
@rank:15 will give a +15 ranking to the demo, adjusting the index. The
higher the value, the higher in the list it will appear.
Additional Resources
The thumbnail that appears in the demo index can be placed in:
demos/resources/images/myDemo.png
Providing a 128x128 png icon bumps the rank value slightly.
Building the Demos
Each demo should add itself to the profiles/ folder in the util
repository:
util/buildscripts/profiles/demos-all.profile.js
Each demo should create a layer making src.js the layer target,
dependent on demos.myDemo.src. This way, each demo has 100% of
the require resources available in the rollup layer and requires
no work to shift between built and unbuilt states.
Create the tree by running a build:
./build.sh action=release profile=demos-all cssOptimize=comments.keepLines version=1.x.x
-------------------------------------------------------------------------------
@rank:-999