Используйте npm для запуска пакета webpack для сохранения в VSC ... или любой другой команды npm, какой вам нравится, например, для компиляции машинописных файлов.
Добавить .vscode/tasks.json
в свой проект:
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"command": "npm",
"isShellCommand": true,
"showOutput": "never",
"suppressTaskName": true,
"tasks": [
{
"taskName": "bundle",
"args": ["run", "bundle"],
"isBuildCommand": true,
"showOutput": "never"
}
]
}
Редактировать keybindings.json
(Файл> Настройки> Сочетания клавиш).
// Place your key bindings in this file to overwrite the defaults
[
{
"key" : "ctrl+s",
"command" : "workbench.action.tasks.build"
}
]
workbench.action.tasks.build
- это встроенный крюк vsc. Смотрите здесь: https://code.visualstudio.com/docs/customization/keybindings#_tasks
Задача также можно получить в VSC с помощью
Ctrl+P
- Тип
task
+ пространство
- посещайте задача предложил или продолжить ввод его имя
по теме: http://stackoverflow.com/questions/29996145/visual-studio-code-compile-on-save –
Я думаю, что с веб-пакетом смотреть файлы - лучший способ сделать это, d проще настроить. –