Skip to content

Commit

Permalink
Open entire folder + file when creating route
Browse files Browse the repository at this point in the history
  • Loading branch information
ericclemmons committed Mar 10, 2019
1 parent 45f6530 commit 8164f18
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/polydev/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "polydev",
"version": "1.4.0",
"version": "1.5.0",
"bin": "./bin/polydev",
"main": "./src/index.js",
"repository": "[email protected]:ericclemmons/polydev.git",
Expand Down
3 changes: 2 additions & 1 deletion packages/polydev/src/middleware/notFound/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const { execSync } = require("child_process")
const { stripIndent } = require("common-tags")
const express = require("express")
const jetpack = require("fs-jetpack")
Expand Down Expand Up @@ -117,7 +118,7 @@ module.exports = express()
await waitOn({ resources: [filepath] }, undefined)

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

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

0 comments on commit 8164f18

Please sign in to comment.