diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100755 index 0000000..e004028 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,20 @@ +{ + // 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": "attach", + "name": "Lenra debug", + "skipFiles": [ + "/**" + ], + "port": 9229, + "localRoot": "${workspaceFolder}", + "remoteRoot": "/app", + "preLaunchTask": "lenra-start" + } + ] +} diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100755 index 0000000..f56aa02 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,19 @@ +{ + // See https://go.microsoft.com/fwlink/?LinkId=733558 + // for the documentation about the tasks.json format + "version": "2.0.0", + "tasks": [ + { + "label": "lenra-start", + "type": "shell", + "command": "lenra start", + "dependsOn":[ "lenra-build" ], + "group": "build" + }, { + "label": "lenra-build", + "type": "shell", + "command": "lenra build", + "group":"build" + } + ] +} diff --git a/lenra.yml b/lenra.yml index a39c2fc..3a09f75 100644 --- a/lenra.yml +++ b/lenra.yml @@ -31,3 +31,9 @@ generator: - "!/resources/" - "!/services/" - "!/views/" +dev: + dofigen: + cmd: + - npm run debug + ports: + - 9229 diff --git a/package.json b/package.json index eec10ee..e41ed0f 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,8 @@ "description": "Lenra's javascript template", "main": "index.js", "scripts": { - "test": "echo \"Error: no test specified\" && exit 0" + "test": "echo \"Error: no test specified\" && exit 0", + "debug": "touch /tmp/.lock && node --inspect-brk=0.0.0.0:9229 server.js" }, "keywords": [], "author": "Lenra",