This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 245966 - Try to understand shims
Summary: Try to understand shims
Status: NEW
Alias: None
Product: javascript
Classification: Unclassified
Component: RequireJS (show other bugs)
Version: 8.0.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-24 13:23 UTC by Vladimir Riha
Modified: 2014-07-24 13:29 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Riha 2014-07-24 13:23:33 UTC
If I had declared some shims like


requirejs.config({
    shim: {
        backbone: {
            deps: ['jquery', 'underscore'],
            exports: 'Backbone'
        },
        underscore: {
            exports: '_'
        }
    }
});


and then load the modules:

define(function (require) {
    var backbone = require('backbone'),
    backbone.

});


it would be nice if for "backbone.", I'd get the code completion/go to navigation as for "Backbone" which is a global object declared in backbone.js. Naive idea is:
 - IDE parses the shim configuration
 - if e.g. 

underscore: {
            exports: '_'
        }

  is found, then once I require the "underscore" module, IDE would offer code completion for _ object (so the same as if I wrote "_.")

Thanks