jam
jam copied to clipboard
how to use config option in package.json jam/config
hello,
First of all, sorry if my question is a bit silly. I'm pretty new in jamjs ... I have in my package.json this config for jam
"jam": {
"packageDir": "app/public/js/vendor",
"baseUrl": "app/public",
"dependencies": {
"backbone": null,
"cs": null
},
"config": {
"path": {
"templates": "app/public/js/templates.combined"
}
}
}
when I try to load from a simple page the "templates" reference, the browser is not able to map "templates" with "app/public/js/templates.combined"
<!doctype html>
<html>
<head>
<title>index</title>
</head>
<body>
hello world
<script src="js/vendor/require.js"></script>
<script>
require(['../js/models/contact', "templates"], function(Contact, templates) {
var c = new Contact({ name: 'michael' });
debugger;
});
</script>
</body>
</html>
My question - How should i use the config to reference my internal template. Thanks
I have try to use the "include" option but i still have the issue.
I'm having the exact same issue, any updates on this?