Skip to content

A tiny npm module for auto-wrapping a dependencies to Inline Array Annotation in AngularJS

License

Notifications You must be signed in to change notification settings

StarterSquad/angularjs-dependencies-wrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AngularJS Dependencies Wrapper

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) {
  
  }]); 

Install

$ npm install angularjs-dependencies-wrapper

Usage

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 

License

MIT

About

A tiny npm module for auto-wrapping a dependencies to Inline Array Annotation in AngularJS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published