(content, options)
| 76 | return `\`${sizeData.size}\`` |
| 77 | }, |
| 78 | PLUGINSXX(content, options) { |
| 79 | const base = path.resolve('packages') |
| 80 | const packages = fs.readdirSync(path.resolve('packages')) |
| 81 | .filter(pkg => !/^\./.test(pkg)) |
| 82 | .filter(pkg => pkg !== 'analytics') |
| 83 | .map(pkg => ([pkg, JSON.parse(fs.readFileSync(path.join(base, pkg, 'package.json'), 'utf8'))])) |
| 84 | .filter(([pkg, json]) => { |
| 85 | return json.private !== true |
| 86 | }) |
| 87 | // alphabetize list |
| 88 | .sort((a, b) => { |
| 89 | const one = a[1] |
| 90 | const two = b[1] |
| 91 | var textA = one.name.toLowerCase() |
| 92 | var textB = two.name.toLowerCase() |
| 93 | return (textA < textB) ? -1 : (textA > textB) ? 1 : 0 |
| 94 | }) |
| 95 | .map(([pkg, json]) => { |
| 96 | const { name, description } = json |
| 97 | return `- [${name}](https://github.com/DavidWells/analytics/tree/master/packages/${pkg}) ${description} [npm link](https://www.npmjs.com/package/${name}).` |
| 98 | }).concat('- Add yours! 👇') |
| 99 | .join('\n') |
| 100 | return packages |
| 101 | }, |
| 102 | PLUGINS: function(content, options) { |
| 103 | const base = path.resolve('packages') |
| 104 | const packages = fs.readdirSync(path.resolve('packages')) |
nothing calls this directly
no outgoing calls
no test coverage detected