ngtmplchck
v2.0.1
Published
Detect AngularJS files that have broken template references
Downloads
5
Maintainers
Readme
ngtmplchck
Detect AngularJS files that have broken template url references.
Usage
Arguments
DIR
- Path to search for files with broken template references. Required.
options.skipGlobs
- Ignore directories or files that match any of the globs. It uses minimatch with default options to match globs.
Example
ngtmplchck DIR --skip-globs '**/.bower/**' '**/build/**' '**/*.spec.js'
from the terminal.
Or in node.js,
var ngtmplchck = require('ngtmplchck');
var opts = {};
opts.skipGlobs = ['**/.bower/**', '**/build/**', '**/*.spec.js'];
ngtmplchck(dir, opts, function (exitCode) {
// exitCode is 0 if no broken references are found; otherwise, it is 1.
});
The code above will scan all files in DIR
, and make sure that all templateUrl
strings map to an existing file somewhere in DIR
.
Tests
Tests require access to a filesystem in which to setup and tear down directory fixtures. Using a ramdisk is recommended.
DIR_FIXTURE_PATH=[path] npm run test