ng-parse-module
Small utility to read/write Angular module creation calls.
Example
var ngParseModule = ; //read module from filevar results = ; //update module dependencies and rewriteresultsdependenciesmodules;resultsdependenciesmodules;results;
API
ngParseModule(file)
Parses the file and returns an object the following properties:
file
- Name of the file parsed.name
- Name of the Angular module.dependencies
- Object containingstart
,end
, andmodules
properties.contents
- Contents of the file parsed.save
- Function that will rewrite the parsed file with any changes thedependencies.modules
property reflected in the new source.
Releases
v2.0.0 - 7/27/2016 - Updated API to allow for require()
statements in module dependencies. You are also now required to add the quotes to the new dependencies you add to the array.