A tiny npm module for auto-wrapping a dependencies to Inline Array Annotation in AngularJS
For example, we have file test.js
with the following code
define([
'./module'
], function (module) {
'use strict';
return modules.service('ContactModal', function ($modal, $timeout, anyService) {
});
let's run
angularjs-dependencies-wrapper test.js
and we get a result
define([
'./module'
], function (module) {
'use strict';
return modules.service('ContactModal', ['$modal', '$timeout', 'anyService', function ($modal, $timeout, anyService) {
}]);
$ npm install angularjs-dependencies-wrapper
var angularjs-dependencies-wrapper = require('angularjs-dependencies-wrapper');
angularjs-dependencies-wrapper.wrap('filename.js', function (err) {
});
or in command line
> angularjs-dependencies-wrapper filename.js
MIT