Function build
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
AssetManifestGenerator.prototype.build = function() {
var supportedTypes = this.supportedTypes;
var generateURI = this.generateURI;
var prepend = this.prepend;
var filesToIgnore = this.filesToIgnore;
Function build
has 46 lines of code (exceeds 25 allowed). Consider refactoring.
AssetManifestGenerator.prototype.build = function() {
var supportedTypes = this.supportedTypes;
var generateURI = this.generateURI;
var prepend = this.prepend;
var filesToIgnore = this.filesToIgnore;
Function css
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
export default nodeLoader(function css(uri) {
return new RSVP.Promise((resolve, reject) => {
if (document.querySelector(`link[href="${uri}"]`)) {
return resolve();
}
Function generateAssetManifest
has 30 lines of code (exceeds 25 allowed). Consider refactoring.
module.exports = function generateAssetManifest(tree, options) {
options = options || {};
var bundlesLocation = options.bundlesLocation || 'bundles';
var filesToIgnore = options.filesToIgnore || [];
Function manifest
has 30 lines of code (exceeds 25 allowed). Consider refactoring.
var manifest = walk(inputPath).reduce(function(manifest, entry) {
var pathParts = entry.split('/');
var assetName = pathParts.pop();
var bundleName = pathParts.shift();
Function css
has 28 lines of code (exceeds 25 allowed). Consider refactoring.
export default nodeLoader(function css(uri) {
return new RSVP.Promise((resolve, reject) => {
if (document.querySelector(`link[href="${uri}"]`)) {
return resolve();
}
Function loadBundle
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
loadBundle(name, retryLoad) {
const cachedPromise = this._getFromCache('bundle', name, retryLoad === RETRY_LOAD_SECRET);
if (cachedPromise) {
return cachedPromise;
Function compareAndIterate
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
function compareAndIterate(initial, current, diffHandler) {
if (initial.length < current.length) {
for (let i = 0; i < current.length; i++) {
let entry = current[i];
if (!has(initial, entry)) {