You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm struggling to get this working with requireJS. I've tried the examples in the README with no luck.
Here is my control case:
define(['require','jquery','mustache','js-yaml.min',],function(require,$){varJB={init : function(boot){vardoc=jsyaml.load('greeting: hello\nname: world');console.log(doc);// this works fine.//require('js-yaml.min'); // this works both uncommented and commented.varsingleDoc=require('http://127.0.0.1/~jade/javascripts/require-js/tags.yaml').shift();console.log(singleDoc);// This does not work// Uncaught Error: Module name 'http://127.0.0.1/~jade/javascripts/require-js/tags.yaml' has not been loaded yet for context: _// http://requirejs.org/docs/errors.html#notloadedif(typeofboot==="function")boot();}};returnJB;});
As per the error documentation (http://requirejs.org/docs/errors.html#notloaded) I have tried to load the tags.yaml first in the define statement. The tags.yaml loads fine but since its not javascript, It returns a syntax error.
Any help would be appreciated, thanks.
The text was updated successfully, but these errors were encountered:
In terms of what you want to do, as far as I can see, it's not enough. If you'll provide a necessary code that RequireJS needs to make JsYAML 100% compatible with RequireJS, I'll be proud to merge it.
We have removed AMD definition in the trunk, as it's obviously not ready yet. Please, if you are confident with RequireJS and can provide a pull-request - I will be happy to merge it in.
I'm struggling to get this working with requireJS. I've tried the examples in the README with no luck.
Here is my control case:
As per the error documentation (http://requirejs.org/docs/errors.html#notloaded) I have tried to load the tags.yaml first in the define statement. The tags.yaml loads fine but since its not javascript, It returns a syntax error.
Any help would be appreciated, thanks.
The text was updated successfully, but these errors were encountered: