remove file extention from device names
This commit is contained in:
parent
acdff1019e
commit
80d49d8997
1 changed files with 4 additions and 1 deletions
5
app.js
5
app.js
|
|
@ -668,7 +668,10 @@ function generateDevices() {
|
|||
fs.readdirSync(root).forEach(type => {
|
||||
let map = devs[type] = devs[type] || {};
|
||||
fs.readdirSync(PATH.join(root,type)).forEach(device => {
|
||||
map[device] = JSON.parse(fs.readFileSync(PATH.join(root,type,device)));
|
||||
let deviceName = device.endsWith('.json')
|
||||
? device.substring(0,device.length-5)
|
||||
: device;
|
||||
map[deviceName] = JSON.parse(fs.readFileSync(PATH.join(root,type,device)));
|
||||
});
|
||||
});
|
||||
synth.devices = `self.devices = ${JSON.stringify(devs)};`;
|
||||
|
|
|
|||
Loading…
Reference in a new issue