@cfpb/cfpb-icons
Advanced tools
Comparing version 0.3.1 to 0.3.2
{ | ||
"name": "@cfpb/cfpb-icons", | ||
"version": "0.3.1", | ||
"version": "0.3.2", | ||
"description": "Design System icons", | ||
@@ -13,3 +13,3 @@ "less": "src/cfpb-icons.less", | ||
], | ||
"gitHead": "a495b375b1c731a9de9d67181c527db14723c839" | ||
"gitHead": "52e06f7c8b3f51e28bd358c880ee3a8c067b2219" | ||
} |
@@ -23,8 +23,13 @@ const path = require( 'path' ); | ||
// Retrieve this plugin script's path so we can fake __dirname. | ||
// When less is updated, the installedPlugins[x] index value may need to | ||
// be updated. If you receive an error when building that's like | ||
// "The "path" argument must be of type string. Received undefined" | ||
// Add console.log( pluginManager.installedPlugins ) and look for the | ||
// index value that has a filename property that points to this file. | ||
const thisScriptPath = pluginManager.installedPlugins[2].filename; | ||
let filenamePathPieces; | ||
let thisScriptPath; | ||
for ( let i = 0, len = pluginManager.installedPlugins.length; i < len; i++ ) { | ||
if ( typeof pluginManager.installedPlugins[i].filename !== 'undefined' ) { | ||
thisScriptPath = pluginManager.installedPlugins[i].filename; | ||
filenamePathPieces = thisScriptPath.split('/'); | ||
if ( filenamePathPieces[filenamePathPieces.length-1] === 'icons-svg-inline.js' ) { | ||
break; | ||
} | ||
} | ||
} | ||
@@ -31,0 +36,0 @@ // __dirname is not accessible in this script, so this fakes it. |
339360
83