javascript - Why is the first api.add_files not being included? -


i have following:

scribe/package.js:

package.describe({   summary: 'a rich text editor framework web platform http://guardian.github.io/scribe/' });  package.on_use(function(api) {   api.add_files('require.js', 'client');   api.add_files('scribe.js', 'client'); }); 

for reason i'm getting error:

uncaught referenceerror: define not defined  

because require.js doesn't show in rendered page. why that?

file tree:

enter image description here

you need export top global variables package. add line before api.add_filescall:

api.export('define') 

add similar line every global variable you'd abke use outside of package.


Comments

Popular posts from this blog

css - I want to align grid in center -

Contact Form PHP Email Script -

python - SWIG function not printing output -