mapbox / maki

A POI Icon Set
http://labs.mapbox.com/maki-icons/
Creative Commons Zero v1.0 Universal
1.5k stars 213 forks source link

dirname no longer exported yet its used in the "For developers" example #461

Closed nreese closed 3 years ago

nreese commented 5 years ago

The For developers section lists an example that uses maki.dirname. See below.

var maki = require('@mapbox/maki');

files.forEach(function(fileName, j) {
  maki.layouts.all.forEach(function(icon) {
    fs.readFile(maki.dirname + '/icons/' + icon + '-11.svg', 'utf8', function(err, file) {
      // Read icons as strings in node
      console.log(file);
    });
  });
});

maki.dirname was removed in this commit https://github.com/mapbox/maki/commit/20dffa42caea08c9c3244612632dc1849d558c6b#diff-168726dbe96b3ce427e7fedce31bb0bc.

The example needs to be updated.

tristen commented 5 years ago

See https://github.com/mapbox/maki/pull/457 which resolves documentation.

nreese commented 5 years ago

457 does not resolve the issue. The example still uses maki.dirname. maki no longer contains a value for dirname.

tristen commented 5 years ago

Apologies. Can address this in that PR.

tristen commented 3 years ago

Will be addressed in the next version (changes appear in the main branch)