Skip to content

Commit

Permalink
chore: continue API sidebar re-org
Browse files Browse the repository at this point in the history
Close #24
  • Loading branch information
erickzhao authored May 13, 2021
1 parent 53c017c commit ac21aa7
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 40 deletions.
13 changes: 12 additions & 1 deletion scripts/tasks/create-sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,18 @@ const { existsSync } = require('fs');
const { stringify } = require('json5');
const globby = require('globby');

const IGNORE_LIST = ['api/locales', 'api/remote', 'api/synopsis'];
const IGNORE_LIST = [
// these are to be removed
'api/locales',
'api/remote',
'api/synopsis',
// these need to be moved to guides
'api/sandbox-option',
'api/frameless-window',
// these don't belong to any category yet
'api/accelerator',
'api/experimental',
];

/**
* @typedef Entry
Expand Down
82 changes: 43 additions & 39 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,13 @@ module.exports = {
'api/crash-reporter',
'api/desktop-capturer',
'api/dialog',
'api/dock',
'api/global-shortcut',
'api/in-app-purchase',
'api/ipc-main',
'api/menu',
'api/message-channel-main',
'api/message-port-main',
'api/native-image',
'api/native-theme',
'api/net',
'api/net-log',
Expand All @@ -165,13 +167,14 @@ module.exports = {
'api/protocol',
'api/screen',
'api/session',
'api/share-menu',
'api/shell',
'api/system-preferences',
'api/touch-bar',
'api/tray',
'api/web-contents',
'api/web-frame-main',
],
].sort(),
},
{
type: 'category',
Expand All @@ -182,8 +185,9 @@ module.exports = {
'api/crash-reporter',
'api/desktop-capturer',
'api/ipc-renderer',
'api/native-image',
'api/web-frame',
],
].sort(),
},
{
type: 'category',
Expand All @@ -193,7 +197,42 @@ module.exports = {
'api/file-object',
'api/webview-tag',
'api/window-open',
],
].sort(),
},
{
type: 'category',
label: 'Chromium and Node.js',
items: [
'api/command-line-switches',
'api/environment-variables',
'api/extensions',
].sort(),
},
{
type: 'category',
label: 'Classes',
items: [
'api/client-request',
'api/command-line',
'api/cookies',
'api/debugger',
'api/dock',
'api/download-item',
'api/incoming-message',
'api/menu-item',
'api/service-workers',
'api/touch-bar-button',
'api/touch-bar-color-picker',
'api/touch-bar-group',
'api/touch-bar-label',
'api/touch-bar-other-items-proxy',
'api/touch-bar-popover',
'api/touch-bar-scrubber',
'api/touch-bar-segmented-control',
'api/touch-bar-slider',
'api/touch-bar-spacer',
'api/web-request',
].sort()
},
{
type: 'category',
Expand Down Expand Up @@ -262,40 +301,5 @@ module.exports = {
'api/structures/web-source',
],
},
{
type: 'category',
label: 'Miscellaneous',
items: [
'api/accelerator',
'api/client-request',
'api/cookies',
'api/debugger',
'api/download-item',
'api/environment-variables',
'api/experimental',
'api/extensions',
'api/frameless-window',
'api/incoming-message',
'api/menu-item',
'api/message-channel-main',
'api/message-port-main',
'api/native-image',
'api/service-workers',
'api/share-menu',
'api/touch-bar-button',
'api/touch-bar-color-picker',
'api/touch-bar-group',
'api/touch-bar-label',
'api/touch-bar-other-items-proxy',
'api/touch-bar-popover',
'api/touch-bar-scrubber',
'api/touch-bar-segmented-control',
'api/touch-bar-slider',
'api/touch-bar-spacer',
'api/web-request',
'api/command-line-switches',
'api/command-line',
],
},
],
};

0 comments on commit ac21aa7

Please sign in to comment.