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. |
| <!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:
/**
| /** | |
| * Track JS error details in Universal Analytics | |
| */ | |
| function trackJavaScriptError(e) { | |
| var errMsg = e.message; | |
| var errSrc = e.filename + ': ' + e.lineno; | |
| ga('send', 'event', 'JavaScript Error', errMsg, errSrc, { 'nonInteraction': 1 }); | |
| } |
| (function(scope, console, CustomEvent) { | |
| var error = scope.error = function() { | |
| var output = [] | |
| for (var i=0; i<arguments.length; i++) { | |
| var arg = arguments[i]; | |
| if (typeof arg === "object" && arg.length) { | |
| output.push.apply(output, Array.prototype.slice.call(arg)); | |
| } else { | |
| output.push(arg); |
| (function () { | |
| var origCall = Function.prototype.call, myCaller; | |
| var arraySlice = Array.prototype.slice; | |
| var errRegex = /at(.*?)\((.*?):([0-9]{1,}):([0-9]{1,})\)/i; | |
| var errReg = { | |
| ff: /(.*?)\@(.*?)\:[0-9]{1,}/i | |
| }; | |
| // IE 11 useragent: Mozilla/5.0 (Windows NT 6.1; Trident/7.0; SLCC2; rv:11.0) like Gecko | |
| if( !navigator.userAgent.match(/Trident/) && navigator.userAgent.match(/FireFox/) ){ |