This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
################################################################################ | |
# Links a local Node.js package directory into the current node_modules/ folder. | |
# This is simpler and more isolated than `npm link` so it's better for quick one-off testing. | |
# | |
# USAGE: | |
# ~/bin/ln-pkg.sh LOCAL_PKG_DIR [LOCAL_PKG_DIR_2] | |
# | |
################################################################################ | |
[ -d "node_modules" ] || { echo "missing node_modules/"; exit 1; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//NOTE: if not in Node.js then you'll need to remove references to module.exports and require() | |
var MyClassName = (function(){ | |
// CONSTRUCTOR | |
var klass = module.exports = MyClassName = function MyClassName(){ | |
//[CONSTRUCTOR]; e.g., if(arguments.length > 0) throw new Error("Unexpected args!"); | |
//[INSTANCE MEMBERS]; e.g., this.value = 123; | |
base.call(this); | |
}, base = require("./BaseClass"), proto = klass.prototype = Object.create(base.prototype, {constructor:{value:klass}}); | |
// PRIVATE STATIC MEMBERS |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
# A SHORT DESCRIPTION OF YOUR SCRIPT GOES HERE | |
# USAGE: | |
# DESCRIPTION OF ENV VARS HERE | |
############################################################################### | |
set -e # exit on command errors (so you MUST handle exit codes properly!) | |
set -o pipefail # capture fail exit codes in piped commands | |
#set -x # execution tracing debug messages | |
# Get command info |