Skip to content

Commit 04917c9

Browse files
committed
fix theme dev shortcut keys not working with theme-editor-sync
1 parent 29d44c3 commit 04917c9

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

.changeset/fuzzy-lies-agree.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@shopify/theme': patch
3+
---
4+
5+
Fix issue where theme dev shortcuts keys would not work when using the 'theme-editor-sync' flag

packages/theme/src/cli/services/dev.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,6 @@ export async function dev(options: DevOptions) {
123123
const {serverStart, renderDevSetupProgress, backgroundJobPromise} = setupDevServer(options.theme, ctx)
124124

125125
readline.emitKeypressEvents(process.stdin)
126-
if (process.stdin.isTTY) {
127-
process.stdin.setRawMode(true)
128-
}
129126

130127
const keypressHandler = createKeypressHandler(urls, ctx)
131128
process.stdin.on('keypress', keypressHandler)
@@ -135,6 +132,9 @@ export async function dev(options: DevOptions) {
135132
renderDevSetupProgress()
136133
.then(serverStart)
137134
.then(() => {
135+
if (process.stdin.isTTY) {
136+
process.stdin.setRawMode(true)
137+
}
138138
renderLinks(urls)
139139
if (options.open) {
140140
openURLSafely(urls.local, 'development server')

0 commit comments

Comments
 (0)