know-cujojs / know

Know cujoJS through these short, focused tutorials
Other
5 stars 5 forks source link

Tutorial: Consuming modules: Module ids #12

Closed teehemkay closed 11 years ago

teehemkay commented 11 years ago

In the documentation at http://know.cujojs.com/tutorials/modules/consuming-modules-module-ids mentions the following:

// module app/billing/billTo/Customer
define(function (require) {

    // questionable: normalizes to "common/payee/Payee"
    var Payee = require("../../common/payee/Payee");
    ...

Shouldn't it be this instead (note the "app/" prefix in the normalization)?:

...
    // questionable: normalizes to app/common/payee/Payee
    var Payee = require("../../common/payee/Payee");

Really great tutorials by the way!

unscriptable commented 11 years ago

Thanks @exidia! Good catch. -- John