license-check
Version:
Npm module to check the presence of a specific header in all the files of a project. The plugin give to you a log of all the files where the header is missing. Never miss again a license header in a file.
29 lines (24 loc) • 572 B
JavaScript
/**
* Created by mromano on 27/04/2016.
*/
var pkgConf = require('pkg-conf'),
license = require('../index');
/**
* Get configuration options
*
* @returns {object} configuration options from main package.json.
*/
var getConfigFromMainPackageJson = function () {
return pkgConf.sync('license-check-config', process.cwd());
};
/**
* Execute the plugin passing the config options.
*
* @returns {string[]} file in string[] format.
*/
var init = function () {
var config = getConfigFromMainPackageJson();
license.check(config);
};
init();