feat: add platfroms strings to API URLs (#51)

This commit is contained in:
Vlad Hashimoto 2019-05-29 02:13:58 +02:00 коммит произвёл GitHub
Родитель d148cfed85
Коммит eb4ddc7153
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 405 добавлений и 405 удалений

796
dist/apis.json поставляемый

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -15,7 +15,7 @@ function getRecords () {
property.fullSignature = `${api.name}.${property.name}`
property.tldr = getTLDR(property)
property.slug = slugger.slug(property.fullSignature, false)
property.url = `https://electronjs.org/docs/api/${api.slug}#${property.slug}`
property.url = `https://electronjs.org/docs/api/${api.slug}#${property.slug}${property.platforms !== undefined ? `-${property.platforms.join('-').toLowerCase()}` : ''}`
records.push(property)
})
@ -25,7 +25,7 @@ function getRecords () {
property.fullSignature = `${api.name}.${property.name}`
property.tldr = getTLDR(property)
property.slug = slugger.slug(property.fullSignature, false)
property.url = `https://electronjs.org/docs/api/${api.slug}#${property.slug}`
property.url = `https://electronjs.org/docs/api/${api.slug}#${property.slug}${property.platforms !== undefined ? `-${property.platforms.join('-').toLowerCase()}` : ''}`
records.push(property)
})
@ -35,7 +35,7 @@ function getRecords () {
method.fullSignature = `${api.name}.${method.name}`
method.tldr = getTLDR(method)
method.slug = slugger.slug(method.fullSignature, false)
method.url = `https://electronjs.org/docs/api/${api.slug}#${method.slug}`
method.url = `https://electronjs.org/docs/api/${api.slug}#${method.slug}${method.platforms !== undefined ? `-${method.platforms.join('-').toLowerCase()}` : ''}`
records.push(method)
})
@ -45,7 +45,7 @@ function getRecords () {
method.fullSignature = `${api.name}.${method.name}${method.signature}`
method.tldr = getTLDR(method)
method.slug = slugger.slug(method.fullSignature, false)
method.url = `https://electronjs.org/docs/api/${api.slug}#${method.slug}`
method.url = `https://electronjs.org/docs/api/${api.slug}#${method.slug}${method.platforms !== undefined ? `-${method.platforms.join('-').toLowerCase()}` : ''}`
records.push(method)
})
@ -55,7 +55,7 @@ function getRecords () {
method.fullSignature = `${api.instanceName}.${method.name}${method.signature}`
method.tldr = getTLDR(method)
method.slug = slugger.slug(method.fullSignature, false)
method.url = `https://electronjs.org/docs/api/${api.slug}#${method.slug}`
method.url = `https://electronjs.org/docs/api/${api.slug}#${method.slug}${method.platforms !== undefined ? `-${method.platforms.join('-').toLowerCase()}` : ''}`
records.push(method)
})
@ -63,7 +63,7 @@ function getRecords () {
events.forEach(event => {
event.apiType = 'event'
event.fullSignature = `${api.name}.on('${event.name}')`
event.url = `https://electronjs.org/docs/api/${api.slug}#event-${event.name}`
event.url = `https://electronjs.org/docs/api/${api.slug}#event-${event.name}${event.platforms !== undefined ? `-${event.platforms.join('-').toLowerCase()}` : ''}`
event.slug = slugger.slug(event.fullSignature, false)
event.tldr = getTLDR(event)
records.push(event)
@ -73,7 +73,7 @@ function getRecords () {
instanceEvents.forEach(event => {
event.apiType = 'event'
event.fullSignature = `${api.instanceName}.on('${event.name}')`
event.url = `https://electronjs.org/docs/api/${api.slug}#event-${event.name}`
event.url = `https://electronjs.org/docs/api/${api.slug}#event-${event.name}${event.platforms !== undefined ? `-${event.platforms.join('-').toLowerCase()}` : ''}`
event.slug = slugger.slug(event.fullSignature, false)
event.tldr = getTLDR(event)
records.push(event)