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

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -