-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrunme.js
39 lines (33 loc) · 999 Bytes
/
runme.js
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
var util = require( 'util' );
var serializer = require( './index' );
// Template string for generating some sample source code with comments
var templateComments = require( './test/lib/tagged-source-string' );
// Configure comment delimiters
var tokens = {
'commentBegin': '/*',
'commentLinePrefix': '*',
'commentEnd': '*/',
'tagPrefix': '@'
};
// Create our sample from the template string
var src = templateComments( tokens );
// Intialize a serializer instance with some options
var mySerializer = serializer({
tokens: tokens,
parsers: serializer.parsers()
});
var result = mySerializer( src );
// var hasErrors = result.some( function ( comment ) {
//
// return comment.tags.some( function ( tag ) {
// return tag.error;
// });
// });
//
// // Log the results real pretty like
// // console.log( util.inspect( result, { depth: 10, colors: true } ) );
//
// if ( hasErrors ) {
//
// console.log( '\nErrors were found in one or more tags!' );
// }