Skip to content

Instantly share code, notes, and snippets.

@gsmcwhirter
Created November 1, 2012 20:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gsmcwhirter/3996314 to your computer and use it in GitHub Desktop.
Save gsmcwhirter/3996314 to your computer and use it in GitHub Desktop.
//Snip from build
require.alias("forbeslindesay-booting-sub-nav/index.js", "dynamics-visualization/deps/booting-sub-nav/index.js");
require.alias("forbeslindesay-booting-sub-nav/scroll.js", "dynamics-visualization/deps/booting-sub-nav/scroll.js");
/* - components.json has this as a script
* - "forbeslindesay-booting-sub-nav": "*" is listed as a dependency
* - the index.html file does the equivalent of "require('my-app').setup()"
* - by "fails" I mean that an error is thrown: failed to require "booting-sub-nav/scroll" from "my-app/index.js" (or the equivalent name tried below)
*/
var bsnav = require("booting-sub-nav") //works just fine
, bsnav_scroll = require("booting-sub-nav/scroll") //fails
//, bsnav_scroll2 = require("forbeslindesay-booting-sub-nav/scroll") //also fails
//, bsnav_scroll3 = require("booting-sub-nav/scroll.js") //also fails
//, bsnav_scroll4 = require("forbeslindesay-booting-sub-nav/scroll.js") //also fails
;
function setup(){
//do some stuff
}
module.exports = {
setup: setup
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment