klei / klei/gulp-angular-filesort

Modules within closures

Open
#42 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
131
Forks
47
PR merge metrics
No merged PRs in 30d

Description

Hello, first I want to say thanks for such awesome plugin.

I want to ask whether will it work correctly for modules that are created within JS closures. I tend to keep this pattern for my Angular modules, for example:

``` javascript
(function(angular) {
var app = angular.module('dgDAO', []);

app.service('API', ['$http', function($http) {
/* Base API service */
var API = {
baseURL: '/api',
describeAPI: function() {
return $http({
method: 'OPTIONS',
url: API.baseURL
})
}
}
return API;
}]);
})(window.angular);
```

Will it work with such module?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading the plugin's module-detection and file-sorting entry points, then test the AngularJS closure example from the issue. Done means establishing whether modules created inside JavaScript closures are recognized correctly and documenting or scoping the required behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
angularjs, javascript
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.