Agenda

Use xycode and nodejs.

config

{
    "tasks": [
        {
            "label": "node:run",
            "description": "run node file",
            "cwd": "${fileDirname}",
            "command": "node \"${file}\""
        },
        {
            "label": "node:version",
            "description": "print node version",
            "command": "node -v"
        }
    ],
    "variables": {},
    "onSaveEvents": [
        {
            "label": "run js file",
            "description": "run javascript",
            "filetypes": [".js"],
            "inActive": false,
            "cwd": "${fileDirname}",
            "command": "node \"${file}\""
        }
    ]
}

write hello world

console.log('hello world, nodejs');

After save the file, you can see the result.