cujojs / cram

Simple, yet powerful, AMD and CommonJS module bundler.
http://cujojs.com
58 stars 9 forks source link

has no method 'config' #15

Closed ghost closed 11 years ago

ghost commented 11 years ago

When I use cram and curl, I get this error: cram failed: grokking "./src/scripts/run.js": TypeError: Object function _curl() { var args, config, includes, warnings;

                warnings = [];

                // parse params
                args = Array.prototype.slice.call(arguments);
                if (Object.prototype.toString.call(args[0]) == '[object Object]') {
                    config = args.shift();
                }
                if (Object.prototype.toString.call(args[0]) == '[object Array]') {
                    includes = args.shift();
                }
                if (typeof args[0] == 'function') {
                    warnings.push('Did not inspect code inside `curl()` callback(s).');
                }

                collectConfig(config, includes, warnings);

                return {
                    // warn when .then() is called
                    then: function (cb, eb) {
                        warn('Did not inspect code inside `.then()` callback(s).');
                    },
                    // warn if .next() is called
                    next: function (modules) {
                        warn('Did not include any modules mentioned in `.next()`: ' + modules);
                    },
                    config: function(cfg) {
                        collectConfig(cfg);
                    }
                };
            } has no method 'config'
unscriptable commented 11 years ago

Hey @acroidea, sorry about that. Please use curl.js's dev branch when working with cram.js.

Thanks for the reminder. I need to release a new curl.js asap!

-- John