Skip to content

Commit

Permalink
fix(sketch): hide shared color styles sync command
Browse files Browse the repository at this point in the history
  • Loading branch information
emyarod committed May 27, 2021
1 parent 794bf5a commit 71608fe
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 23 deletions.
2 changes: 1 addition & 1 deletion packages/sketch/src/commands/colors/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
* LICENSE file in the root directory of this source tree.
*/

export { sync, syncColorVars } from './sync';
export { syncColorVars } from './sync';
export { generate } from './generate';
10 changes: 2 additions & 8 deletions packages/sketch/src/commands/colors/sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,10 @@

import { Document } from 'sketch/dom';
import { command } from '../command';
import { syncColorStyles, syncColorVariables } from '../../sharedStyles/colors';

export function sync() {
command('commands/colors/sync', () => {
syncColorStyles({ document: Document.getSelectedDocument() });
});
}
import { syncColorVariables } from '../../sharedStyles/colors';

export function syncColorVars() {
command('commands/colors/syncvars', () => {
command('commands/colors/syncColorVars', () => {
syncColorVariables({ document: Document.getSelectedDocument() });
});
}
6 changes: 1 addition & 5 deletions packages/sketch/src/commands/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,7 @@ import 'regenerator-runtime/runtime';
// triggered by having separate entrypoints. Most notably we would encounter
// parse errors because the bundlers were being generated incorrectly during
// incremental rebuilds.
export {
sync as syncColors,
syncColorVars,
generate as generateColors,
} from './colors';
export { syncColorVars, generate as generateColors } from './colors';
export { generate as generateIcons } from './icons';
export { syncSmallIcons, syncLargeIcons } from './icons';
export { sync as syncThemes, generate as generateThemes } from './themes';
Expand Down
11 changes: 2 additions & 9 deletions packages/sketch/src/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,9 @@
"bundleVersion": 1,
"name": "Carbon Elements 🎨",
"commands": [
{
"name": "Sync shared layer styles",
"identifier": "carbon.elements.colors.sync",
"script": "commands/index.js",
"handler": "syncColors"
},
{
"name": "Sync color variables",
"identifier": "carbon.elements.colors.syncvars",
"identifier": "carbon.elements.colors.syncColorVars",
"script": "commands/index.js",
"handler": "syncColorVars"
},
Expand Down Expand Up @@ -82,8 +76,7 @@
{
"title": "Colors",
"items": [
"carbon.elements.colors.sync",
"carbon.elements.colors.syncvars",
"carbon.elements.colors.syncColorVars",
"carbon.elements.colors.generate"
]
},
Expand Down

0 comments on commit 71608fe

Please sign in to comment.