forked from smartcomments/smartcomments.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
311 lines (264 loc) · 13 KB
/
index.html
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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>SmartComments</title>
<!-- Bootstrap core CSS -->
<link href="assets/css/bootstrap.min.css" rel="stylesheet">
<link href="assets/css/index.css" rel="stylesheet">
<link href="assets/css/codemirror.css" rel="stylesheet">
<link rel="shortcut icon" type="image/x-icon" href="assets/ico/favicon.png" />
<style type="text/css">
@media (max-width: 980px) {
.demo-textarea {
background-image:none;
}
}
</style>
</head>
<body>
<header role="banner">
<div class="container">
<div class="navbar-wrapper navbar-fixed-top">
<div class="navbar navbar-green navbar-static-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand navbar-font" href="index.html">
<img src="assets/img/logo.png" class="img-responsive img-padding">
<center><span style="margin-top:5px">/* For idlers men */</span></center>
</a>
</div>
<div class="navbar-collapse collapse col-md-offset-6" role="navigation">
<ul class="nav navbar-nav">
<li id="1" class="active jquery">
<a class="home" href="#home">
<center>
<img src="assets/img/home.png" class="hidden-xs img-responsive img-padding">
Home
</center>
</a>
</li>
<li id="3" class="jquery">
<a class="installation" href="#installation">
<center>
<img src="assets/img/Installation.png" class="hidden-xs img-responsive img-padding">
Installation
</center>
</a>
</li>
<li id="4" class="jquery">
<a class="usage" href="#usage">
<center>
<img src="assets/img/usage.png" class="hidden-xs img-responsive img-padding">
Usage
</center>
</a>
</li>
<li id="2" class="jquery">
<a class="features" href="#features">
<center>
<img src="assets/img/features.png" class="hidden-xs img-responsive img-padding">
Features
</center>
</a>
</li>
<li id="5" class="jquery">
<a class="about" href="#about">
<center>
<img src="assets/img/about.png" class="hidden-xs img-responsive img-padding">
About
</center>
</a>
</li>
</ul>
</div>
</div>
<div class="navbar-line"></div>
</div>
</div>
</div>
</header>
<div class="container">
<br>
<div class="row">
<section id="home">
<div class="col-sm-6 col-md-6">
<center>
<div class="bs-callout bs-callout-info">
<p>SmartComments, It's a tool that allow you to create implicit comments from javascript source code. You can integrate it with javascript documentation generators like <a href="http://yuilibrary.com/yui/docs">YUIDocs</a>.</p>
<code>
<span>Latest Stable Version: v0.1.0</span>
</code>
</div>
</center>
</div>
<div class="col-sm-5 col-md-4 col-md-offset-1">
<pre class="pre-consola">
<p>npm install -g smartcomments<br>smartcomments generate</p>
</pre>
</div>
</section>
</div>
<div class="row">
<div class="col-sm-12 col-md-12">
<div class="demo">
</div>
</div>
<div class="row">
<div class="col-sm-3 col-md-3 pull-right">
<button type="button" class="btn btn-info generate">Generate comment <img style="max-width:100%; height:auto" src="assets/img/generate.png"></button>
</div>
</div>
</div>
<section id="installation">
<br>
<div class="row">
<div class="col-sm-12 col-md-12">
<img src="assets/img/Installation-img.png">
</div>
<br>
<div class="col-sm-12 col-md-12">
<p class="row-background">
Make sure you have installed <a href="http://nodejs.org">Node.js</a> and then run the follow command in the console.
</p>
<pre class="pre-consola">
<p>npm install -g smartcomments</p>
</pre>
<p class="row-background">
After the installation process have finished you can put the command <b>smartcomments</b> on the console. You will see something like this.
</p>
<pre class="pre-consola">
<p>dariel@ltsnotebook:~$ smartcomments<br><br>Hello!!!<br>using [email protected] on [email protected]<br> -h, --help Show this sttuf<br>-g, --generate Generate comments from your source<br> -t, --target Specifies the target from which to generate </p>
</pre>
</div>
</div>
</section>
<section id="usage">
<br>
<div class="row">
<div class="col-sm-12 col-md-12">
<img src="assets/img/usage-img.png">
</div>
<br>
<div class="col-sm-12 col-md-12">
<p class="row-background">
Move to the folder where the .js files are located for which you want to generate the comments. And put command <b>--generate</b> on the console.
</p>
<pre class="pre-consola">
<p>dariel@ltsnotebook:~$ cd some_dir <br>dariel@ltsnotebook:~/some_dir$ smartcomments --generate</p>
</pre>
<p class="row-background">
Under the hood SmartComments:<br><br>
1 - Search in the current directory if you have any custom configuration file. See <a href="#custom_config">custom configuration</a> for more details.<br><br>
2 - Search recursively through the specified folder, all files that match with <b>match_files</b> option, by default search for .js files only. See <a href="#config_options">configuration options</a> for more details.<br><br>
3 - For each file found SmartComments generates the comments associated with the tags specified in the options. See <a href="#supported_tags">supported tags</a> for more details.<br><br>
4 – And finally SmartComments creates a backup of the files, in case you want to return to the previous state. The backup files look like this <b>~my_file.js</b>. You can disable this feature in the configuration file.
</p>
</div>
<div class="col-sm-12 col-md-12">
<p class="row-background">
If you want to especify the directory or file which you want to generate the comments, then using <b>--target</b> option.
</p>
<pre class="pre-consola">
<p>dariel@ltsnotebook:~$ smartcomments -g --target /some_dir_or_file<br></p>
</pre>
</div>
</div>
<section id="custom_config">
<div class="col-sm-12 col-md-12">
<h4>Custom configuration</h4>
<p class="row-background">
If you want to specify your own configuration, create a file with the <b>smartcomments.json</b> name, in the directory where you want to generate the comments. If the configuration file name it’s different than smartcomments.json, SmartComments won’t load your configuration.
You can see a configuration <a href="https://github.com/smartcomments/smartcomments/blob/master/config/config.json">file example here</a>.
</p>
</div>
</section>
<section id="config_options">
<div class="col-sm-12 col-md-12">
<h4>Configuration options</h4>
<p class="row-background">
<b>target:</b> If it is a directory this option specify that the files within this directory are the ones that SmartComment will generate comments for. If it’s a file SmartComment will generate the comments for this file.<br><br>
<b>match_files:</b> Regular expression that defines rules for the file names, for example ["^((?!~).)*.(js)$"] match if the file names ends with .js and do not contain ~.<br><br>
<b>backup:</b> Accepts true or false. If true a backup of the files is created before the file is modified.<br><br>
<b>Template:</b> Path of the template that you want to use for the comments generation. In a template, a series of algorithm that allow to generate the comments from an AST with the JavaScript code are defined.<br><br>
</p>
</div>
</section>
</section>
<section id="features">
<br>
<div class="row">
<div class="col-sm-12 col-md-12">
<img src="assets/img/features-img.png">
</div>
<br>
<div class="col-sm-12 col-md-12">
<p class="row-background">
1 - Sublime Text Plugin<br>
2 - Custom Templates<br>
</p>
</div>
</div>
</section>
<section id="about">
<br>
<div class="row">
<div class="col-sm-12 col-md-12">
<img src="assets/img/about-img.png">
</div>
<br>
<div class="col-sm-12 col-md-12">
<p class="row-background">
SmartComments is developed by a community, in which you can work freely.<br><br>
Node.js Developer: <a href="mailto:[email protected]" title="[email protected]"> Dariel N. Vila Plagado</a>,
Front End Site Developer: <a href="mailto:[email protected]" title="[email protected]">Carlos Madrazo Reyes</a>,
Sublime Text Plugin: <a href="mailto:[email protected]" title="[email protected]">Yolier Galán Tassé </a>,
Front End Site Design: <a href="mailto:[email protected]" title="[email protected]">Pedro Hernández Jiménez</a>.
</p>
</div>
</div>
</section>
<section>
<div class="col-sm-12 col-md-12">
<h4>Aknowledgement</h4>
<p class="row-background">
To Mr. Ariya Hidayat <a href="http://esprima.org/">Esprima</a>’ creator,
Mr. David Quintana <a href="https://github.com/gigaherz/eswalker">eswalker</a>’ creator, Mr. Caridy Patino, Principal Engineer at Yahoo!, and to all the persons that helped with this project.ss
</p>
</div>
</section>
<br>
<footer role="contentinfo">
<a href=""><p class="text-muted credit">Fork me on Github</p></a>
</footer>
</div>
<script type="text/javascript" src="assets/js/jquery.js"
></script>
<script type="text/javascript" src="assets/js/bootstrap.min.js"
></script>
<script type="text/javascript" src="assets/js/require.js" data-main="assets/js/app/app.js"></script>
<script type="text/javascript" src="assets/js/codemirror.js"
></script>
<script type="text/javascript" src="assets/js/javascript.js"
></script>
<script type="text/javascript" src="assets/js/index.js"
></script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-44521541-1', 'smartcomments.github.io');
ga('send', 'pageview');
</script>
</body>
</html>