Skip to content

Commit 8634d72

Browse files
Merge pull request #66 from Azure-Samples/launch-vscode-react-sample
Add js react sample configs
2 parents bc197b4 + eb9b713 commit 8634d72

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// A launch configuration that compiles the extension and then opens it inside a new window
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
{
6+
"version": "0.2.0",
7+
"configurations": [
8+
{
9+
"type": "node",
10+
"request": "launch",
11+
"name": "Launch Program",
12+
"program": "${workspaceFolder}\\.vscode\\vsCodeLaunchReactSample.js"
13+
}
14+
]
15+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
const {exec} = require('child_process');
2+
const path = require("path");
3+
exec('npm install && npm start',{cwd:path.resolve('.\\SPA')}, (err, output) => {
4+
// once the command has completed, the callback function is called
5+
if (err) {
6+
// log and return if we encounter an error
7+
console.error("Error on running commands: ", err)
8+
return
9+
}
10+
// log the output received from the command
11+
console.log("Output: \n", output)
12+
})

0 commit comments

Comments
 (0)