Skip to content

Commit

Permalink
Docgen: log per vendor.
Browse files Browse the repository at this point in the history
  • Loading branch information
Koenkk committed Apr 18, 2018
1 parent eb063ef commit 3133cb7
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions support/docgen.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,20 @@ const logDevices = (devices) => {
});
}

const vendors = Array.from(new Set(Object.values(deviceMapping).map((d) => d.vendor)));
vendors.sort();

console.log('GENERATED')
console.log('=============================')
console.log('*NOTE: Automatically generated by `npm run docgen`*')
console.log('')
console.log('In case your device is **NOT** listed here, please create an issue at: https://github.com/Koenkk/zigbee2mqtt/issues');
console.log('')
logDevices(Object.values(deviceMapping));
console.log('');
vendors.forEach((vendor) => {
console.log(`### ${vendor}`);
logDevices(Object.values(deviceMapping).filter((d) => d.vendor === vendor));
console.log('');
})
console.log('### Planned to support');
console.log('Devices listed below are **NOT** supported but are planned to be.');
console.log('')
Expand Down

0 comments on commit 3133cb7

Please sign in to comment.