diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000..a742a59e --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,41 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + + { + "type": "node", + "request": "launch", + "name": "BoostNote Main", + "protocol": "inspector", + "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron", + "runtimeArgs": [ + "--remote-debugging-port=9223", + "--hot", + "${workspaceFolder}/index.js" + ], + "windows": { + "runtimeExecutable": "${workspaceFolder}/node_modeules/.bin/electron.cmd" + } + }, + { + "type": "chrome", + "request": "attach", + "name": "BoostNote Renderer", + "port": 9223, + "webRoot": "${workspaceFolder}", + "sourceMapPathOverrides": { + "webpack:///./~/*": "${webRoot}/node_modules/*", + "webpack:///*": "${webRoot}/*" + } + } + ], + "compounds": [ + { + "name": "BostNote All", + "configurations": ["BoostNote Main", "BoostNote Renderer"] + } + ] +} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 00000000..c6664225 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,27 @@ +{ + // See https://go.microsoft.com/fwlink/?LinkId=733558 + // for the documentation about the tasks.json format + "version": "2.0.0", + "tasks": [ + { + "label": "Build Boostnote", + "group": "build", + "type": "npm", + "script": "watch", + "isBackground": true, + "presentation": { + "reveal": "always", + }, + "problemMatcher": { + "pattern":[ + { + "regexp": "^([^\\\\s].*)\\\\((\\\\d+,\\\\d+)\\\\):\\\\s*(.*)$", + "file": 1, + "location": 2, + "message": 3 + } + ] + } + } + ] +} \ No newline at end of file diff --git a/package.json b/package.json index e9ef0de0..a26e625e 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,8 @@ "jest": "jest", "fix": "eslint . --fix", "lint": "eslint .", - "dev": "node dev-scripts/dev.js" + "dev": "node dev-scripts/dev.js", + "watch": "webpack-dev-server --hot" }, "config": { "electron-version": "2.0.7" diff --git a/webpack.config.js b/webpack.config.js index 16b7fd73..6a05f231 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -28,7 +28,14 @@ var config = Object.assign({}, skeleton, { publicPath: 'http://localhost:8080/assets/' }, debug: true, - devtool: 'cheap-module-eval-source-map' + devtool: 'cheap-module-eval-source-map', + devServer: { + port: 8080, + hot: true, + inline: true, + quiet: true, + publicPath: 'http://localhost:8080/assets/' + } }) module.exports = config