Blame view

bower_components/polymer-element-catalog/build/catalog/utils/package-details.js 360 Bytes
07d13c9c   isisadmin   polymer catalog
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
  var path = require('path');
  var fs = require('fs');
  
  module.exports = function (imports) {
  
    var root = imports.root;
    var name = imports.name;
  
    var packageBowerFilepath = path.resolve(root, 'bower_components/' + name + '/.bower.json');
    if (fs.existsSync(packageBowerFilepath)) {
      return require(packageBowerFilepath);
    } else {
      return {};
    }
  };