spacedocs 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,98 @@
1
+ <!doctype html>
2
+ %html
3
+ %head
4
+ %meta(charset="utf-8")
5
+ %meta(content="IE=edge,chrome=1" http-equiv="X-UA-Compatible")
6
+
7
+ %title= class_name
8
+
9
+ - if dev
10
+ %link(href="/stylesheets/spacedocs/docs.css" media="screen, projection" rel="stylesheet" type="text/css")
11
+ - else
12
+ %link(href="/assets/spacedocs/docs.css" media="screen, projection" rel="stylesheet" type="text/css")
13
+
14
+ %script(src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript")
15
+ %body
16
+ %pre
17
+ %nav
18
+ -class_names.each do |doc_class|
19
+ - name = doc_class.gsub('#', '')
20
+
21
+ -if doc_class == class_name
22
+ %a.active(href="#{name}.html")= name
23
+ -else
24
+ %a(href="#{name}.html")= name
25
+ - if method_list.length > 0
26
+ %section.method_list
27
+ %h3= "#{class_name} Methods"
28
+ .methods
29
+ -method_list.sort.each do |method_name|
30
+ %a(href="#{class_name}.html##{method_name}")= method_name
31
+ .documentation
32
+ -if class_summary
33
+ %h1= "#{class_name} Summary"
34
+ .description
35
+ %section.summary
36
+ = class_summary['description']['summary']
37
+ %section.usage
38
+ %h3 Usage
39
+ = class_summary['description']['body']
40
+ %hr
41
+ -if methods.first
42
+ -methods.keys.sort.each do |method_name|
43
+ - method_data = methods[method_name]
44
+ %a(name="#{method_name}")
45
+ / TODO make sure method_data isn't nil
46
+ - if method_data && method_data.first
47
+ %h1= "#{class_name}#{method_name}(#{method_data['parameters'].keys.join ', '})"
48
+ .description
49
+ %section.summary= method_data['summary']
50
+
51
+ %section.usage
52
+ %h3 Usage
53
+ = preserve(method_data['code_sample'])
54
+
55
+ - if method_data['parameters'].keys.length > 0
56
+ %section.parameters
57
+ %h3 Parameters
58
+ %ul
59
+ - method_data['parameters'].each_pair do |param_name, param_data|
60
+ %li
61
+ %span.param_name= param_name
62
+ = " - "
63
+ %span.param_description= param_data['description']
64
+
65
+ -if method_data['returns']
66
+ %section.returns
67
+ %h3 Returns
68
+ %p
69
+ Type:
70
+ %a(href="#{method_data['returns']['type']}.html")= method_data['returns']['type']
71
+ %p.return_description= method_data['returns']['description']
72
+
73
+ %section.source
74
+ %h3 Source
75
+ %a.toggle_source Toggle
76
+ %pre
77
+ %code
78
+ = preserve(method_data['source'])
79
+ %hr
80
+
81
+ :javascript
82
+ $(function() {
83
+ $(".documentation").on("click", ".toggle_source", function(e) {
84
+ e.preventDefault();
85
+ return $(this).next().toggle();
86
+ });
87
+ return $("code.run").each(function() {
88
+ var canvas, codeElement, compiledJs, source;
89
+ codeElement = $(this);
90
+ source = codeElement.text();
91
+ compiledJs = CoffeeScript.compile(source, {
92
+ bare: true
93
+ });
94
+ canvas = $("<canvas width=200 height=150/>").pixieCanvas();
95
+ codeElement.after(canvas);
96
+ return eval(compiledJs);
97
+ });
98
+ });
@@ -0,0 +1,16 @@
1
+ <!doctype html>
2
+ %html
3
+ %head
4
+ %meta(charset="utf-8")
5
+ %meta(content="IE=edge,chrome=1" http-equiv="X-UA-Compatible")
6
+
7
+ %title PixieEngine Documentation
8
+
9
+ %link(href="/assets/spacedocs/docs.css" media="screen, projection" rel="stylesheet" type="text/css")
10
+ %body
11
+ %pre
12
+ %nav
13
+ -class_names.each do |doc_class|
14
+ - name = doc_class.gsub('#', '')
15
+
16
+ %a(href="#{name}.html")= name
metadata ADDED
@@ -0,0 +1,73 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: spacedocs
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.2
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Matt Diebolt
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-06-12 00:00:00.000000000 Z
13
+ dependencies: []
14
+ description: Generates beautiful API docs based on JSON output from the Node project
15
+ dox. Supports jsDocToolkit comment style
16
+ email:
17
+ - mdiebolt@gmail.com
18
+ executables: []
19
+ extensions: []
20
+ extra_rdoc_files: []
21
+ files:
22
+ - dox/bin/dox
23
+ - dox/History.md
24
+ - dox/index.js
25
+ - dox/lib/dox.js
26
+ - dox/lib/utils.js
27
+ - dox/Makefile
28
+ - dox/package.json
29
+ - dox/Readme.md
30
+ - dox/test/dox.test.js
31
+ - dox/test/fixtures/a.js
32
+ - dox/test/fixtures/b.js
33
+ - dox/test/fixtures/c.js
34
+ - dox/test/fixtures/d.js
35
+ - dox/test/fixtures/titles.js
36
+ - lib/assets/stylesheets/spacedocs/docs.css.sass
37
+ - lib/spacedocs/engine.rb
38
+ - lib/spacedocs/version.rb
39
+ - lib/spacedocs.rb
40
+ - source/class.html.haml
41
+ - source/index.html.haml
42
+ - README.md
43
+ homepage: http://mdiebolt.github.com/spacedocs
44
+ licenses: []
45
+ post_install_message:
46
+ rdoc_options: []
47
+ require_paths:
48
+ - lib
49
+ required_ruby_version: !ruby/object:Gem::Requirement
50
+ none: false
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ segments:
56
+ - 0
57
+ hash: -2195415310241243817
58
+ required_rubygems_version: !ruby/object:Gem::Requirement
59
+ none: false
60
+ requirements:
61
+ - - ! '>='
62
+ - !ruby/object:Gem::Version
63
+ version: '0'
64
+ segments:
65
+ - 0
66
+ hash: -2195415310241243817
67
+ requirements: []
68
+ rubyforge_project:
69
+ rubygems_version: 1.8.10
70
+ signing_key:
71
+ specification_version: 3
72
+ summary: Documentation from space
73
+ test_files: []