Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function ConfigRegistry(config) {
DefaultRegistry.call(this);
// Get the current working directory of the user's current project
config.cwd = cwd();
// Load the package.json in the base of the user's current project
config.pkg = loadJSON('package.json', {cwd: config.cwd});
if(config.pkg.ngFactory) {
log(util.format('Using ng-factory config from %s', chalk.magenta(tildifyCwd('package.json', {cwd: config.cwd}))));
this.config = _.merge(config, checkConfig(config.pkg.ngFactory));
} else {
log(util.format('Using ng-factory config file %s', chalk.magenta(tildifyCwd('ngfactory.json', {cwd: config.cwd}))));
this.config = _.merge(config, checkConfig(loadJSON('ngfactory.json', {cwd: config.cwd})), {file: true});
}
}
function PreTagAndPushRegistry() {
DefaultRegistry.call(this);
}