angularjs-dependencies-wrapper

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

Added by: Sam Deering

GitHub

Repository

startersquad/angularjs-dependencies-wrapper

Stats

Stars: 0

Watchers: 0

Forks: 0

Module Description

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

Module stats last updated: 2015-04-12 22:45:07

Disclaimer: Some data on this page may have been gathered from the authors GitHub respository. If you see any mistakes or outdated information please let us know. Thanks!