nl_tokens: This function scans the / client / extensions directory in order to generate a map that looks like this : { sensei : absolute / path / to / wp - calypso / client / extensions / sensei woocommerce : absolute / path / to / wp - calypso / client / extensions / woocommerce .... }
pl_tokens: function getAliasesForExtensions ( { extensionsDirectory } ) { const extensionsNames = fs . readdirSync ( extensionsDirectory ) . filter ( filename => filename . indexOf ( '.' ) === - 1 ) ; // heuristic for finding directories const aliasesMap = { } ; extensionsNames . forEach ( extensionName => ( aliasesMap [ extensionName ] = path . <mask> ( extensionsDirectory , extensionName ) ) ) ; return aliasesMap ; }