Skip to content

Instantly share code, notes, and snippets.

@huntc huntc/a.js
Last active Jan 2, 2016

What would you like to do?
Shows how NODE_PATH, amdefine and Node can be used together to run things with multiple context paths.
/*global define */
// This file for the target/public folder
define(function() {
return 1;
/*global define */
// This file for the target/public folder
define(["./a"], function(a) {
return a + 1;
export NODE_PATH=`pwd`/target/public:`pwd`/target/public-test \
node target/public-test/test.js
/*global define, require */
// This file for the target/public-test folder
var b = require("b");
console.log("b: " + b);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.