Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Determine best default headerblock format #1

Open
DamonOehlman opened this issue Oct 10, 2012 · 0 comments
Open

Determine best default headerblock format #1

DamonOehlman opened this issue Oct 10, 2012 · 0 comments

Comments

@DamonOehlman
Copy link
Member

Hey All,

Working on this as a standalone project which is designed to bring header block comment generation to Interleave. At the moment, the code is still a work in progress, but some functionality is already there. Before I go too far though, I'd love to have some feedback on what people think should be in a source file headerblock.

Here are some examples from around the web:

jquery

/*!
 * jQuery JavaScript Library v1.8.2
 * http://jquery.com/
 *
 * Includes Sizzle.js
 * http://sizzlejs.com/
 *
 * Copyright 2012 jQuery Foundation and other contributors
 * Released under the MIT license
 * http://jquery.org/license
 *
 * Date: Thu Sep 20 2012 21:13:05 GMT-0400 (Eastern Daylight Time)
 */

eve

// ┌──────────────────────────────────────────────────────────────────────────────────────┐ \\
// │ Eve 0.3.5 - JavaScript Events Library                                                │ \\
// ├──────────────────────────────────────────────────────────────────────────────────────┤ \\
// │ Copyright (c) 2008-2012 Dmitry Baranovskiy (http://dmitry.baranovskiy.com/)          │ \\
// │ Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license. │ \\
// └──────────────────────────────────────────────────────────────────────────────────────┘ \\

and there are plenty of others.

My general thoughts are that the headerblock should not only be easy on the eye for a human, but also something that is potentially machine readable. So potentially incorporating a YAML section for metadata is one thing I've been considering.

Here are some early examples of the kind of thing I'm thinking about:

/* ~libraryname~
 * 
 * Multiline description of the library
 * 
 * Copyright line?
 * 
 * ---meta
 * version: 0.0.1 (semver)
 * build: (build date - isoformat)
 *
 * licenses:
 *     - MIT
 * 
 * maintainers:
 *     - Fred Flintstone <[email protected]>
 * 
 * contributors:
 *     - Barney Rubble <[email protected]>
 * 
 */ 

The leading comment line incorporating a tilda (~) would be used to indicate that the comment block is potentially machine parseable.

Thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant