Skip to content
This repository has been archived by the owner on Aug 7, 2019. It is now read-only.

config paths not created #142

Open
robdodson opened this issue Apr 30, 2013 · 3 comments
Open

config paths not created #142

robdodson opened this issue Apr 30, 2013 · 3 comments

Comments

@robdodson
Copy link

{
    "name": "my-project",
    "version": "0.0.1",
    "description": "My example project",
    "jam": {
        "baseUrl": "public",
        "packageDir": "public/vendor",
        "dependencies": {
            "jquery": "1.7.x",
            "underscore": null
        },
        "config": {
          "paths": {
            "templates": "public/templates"
          }
        }
    }
}

When I put the above into a package.json and jam install I get a require.config.js file which has entries for jquery and underscore but it doesn't create a path for templates.

var jam = {
    "packages": [
        {
            "name": "jquery",
            "location": "vendor/jquery",
            "main": "jquery.js"
        },
        {
            "name": "underscore",
            "location": "vendor/underscore",
            "main": "underscore.js"
        }
    ],
    "version": "0.2.17",
    "shim": {
        "underscore": {
            "exports": "_"
        }
    }
};

if (typeof require !== "undefined" && require.config) {
    require.config({
    "packages": [
        {
            "name": "jquery",
            "location": "vendor/jquery",
            "main": "jquery.js"
        },
        {
            "name": "underscore",
            "location": "vendor/underscore",
            "main": "underscore.js"
        }
    ],
    "shim": {
        "underscore": {
            "exports": "_"
        }
    }
});
}
else {
    var require = {
    "packages": [
        {
            "name": "jquery",
            "location": "vendor/jquery",
            "main": "jquery.js"
        },
        {
            "name": "underscore",
            "location": "vendor/underscore",
            "main": "underscore.js"
        }
    ],
    "shim": {
        "underscore": {
            "exports": "_"
        }
    }
};
}

if (typeof exports !== "undefined" && typeof module !== "undefined") {
    module.exports = jam;
}
@sntx
Copy link

sntx commented May 16, 2013

I'm having the same problem...

@Jae
Copy link

Jae commented Jun 2, 2013

yes me too, none of the config is passed through to requirejs....

not sure if that's intended feature

you can easily have requirejs.config({...}) in your main app.js and use Jam to manage external dependencies?

however it's not very clear from documentation for integration between Jam and Require.js

Also baseUrl property under jam is also confusing as it's got nothing to do with baseUrl property for requirejs config.

@qwertme
Copy link

qwertme commented Oct 23, 2013

Has anyone figured this out yet?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants