This is the reference point. All the other options are based off this.
|-- app
| |-- controllers
| | |-- admin
| /* | |
| highlight v3 !! Modified by Jon Raasch (http://jonraasch.com) to fix IE6 bug !! | |
| Highlights arbitrary terms. | |
| <http://johannburkard.de/blog/programming/javascript/highlight-javascript-text-higlighting-jquery-plugin.html> | |
| MIT license. |
| /** | |
| * | |
| * @file tileTemplate.js | |
| * @auther Pandao | |
| * @version 1.5.0 | |
| * @license MIT | |
| * @copyright 2014 Pandao | |
| * {@link https://github.com/pandao/tileTemplate} | |
| */ |
| /** | |
| * @apiDefineStructure ${NAME}Params | |
| * @apiParam {String} slug ${MODEL} identifier | |
| */ | |
| /** | |
| * @apiDefineStructure ${NAME}Success | |
| * @apiSuccess {String} slug ${MODEL} identifier | |
| * @apiSuccess {Date} createdAt Date of document creation. | |
| * @apiSuccess {Date} updatedAt Date of document last change. | |
| */ |
| var util = { | |
| getAttribute: function (dom, attr) { | |
| if (dom.getAttribute !== undefined) { | |
| return dom.getAttribute(attr); | |
| } else if (dom[attr] !== undefined) { | |
| return dom[attr]; | |
| } else { | |
| return null; | |
| } | |
| }, |
| // Trigger the initial route and enable HTML5 History API support, set the | |
| // root folder to '/' by default. Change in app.js. | |
| Backbone.history.start({ pushState: true, root: app.root }); | |
| // All navigation that is relative should be passed through the navigate | |
| // method, to be processed by the router. If the link has a `data-bypass` | |
| // attribute, bypass the delegation completely. | |
| $(document).on("click", "a[href]:not([data-bypass])", function(evt) { | |
| // Get the absolute anchor href. | |
| var href = { prop: $(this).prop("href"), attr: $(this).attr("href") }; |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Base64 Demo</title> | |
| <meta charset="utf-8"> | |
| <script src='http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js' type='text/javascript'></script> | |
| <script src='https://javascriptbase64.googlecode.com/files/base64.js' type='text/javascript'></script> |
When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:
var Article = require('../../../models/article');Those suck for maintenance and they're ugly.
| /* | |
| * Copyright (c) 2014, Jay Oster | |
| * All rights reserved. | |
| * | |
| * Redistribution and use in source and binary forms, with or without | |
| * modification, are permitted provided that the following conditions are met: | |
| * | |
| * 1. Redistributions of source code must retain the above copyright notice, | |
| * this list of conditions and the following disclaimer. | |
| * 2. Redistributions in binary form must reproduce the above copyright notice, |
Some docs I made for contributing documentation:
Any comments written with a comment block /** comment block **/ will get picked up by jsdoc. If you have comments you would like to make that don't show up in the documentation, use // comment.
Namespace docs are created by putting /** @namespace */ before the variable.
Each key can be documented with a comment block that is broken down like this:
/**