Skip to content

Commit 8164f18

Browse files
committed
Open entire folder + file when creating route
1 parent 45f6530 commit 8164f18

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

packages/polydev/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "polydev",
3-
"version": "1.4.0",
3+
"version": "1.5.0",
44
"bin": "./bin/polydev",
55
"main": "./src/index.js",
66
"repository": "git@github.com:ericclemmons/polydev.git",

packages/polydev/src/middleware/notFound/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
const { execSync } = require("child_process")
12
const { stripIndent } = require("common-tags")
23
const express = require("express")
34
const jetpack = require("fs-jetpack")
@@ -117,7 +118,7 @@ module.exports = express()
117118
await waitOn({ resources: [filepath] }, undefined)
118119

119120
// Wait for the file to open
120-
await opn(`vscode://file/${filepath}`, { wait: false })
121+
execSync(`code . -g ${filepath}`)
121122

122123
// Reload the requested URL
123124
// ! Hopefully the router has been re-created by this point!

0 commit comments

Comments
 (0)