From 47f0b673695a88d852dad219dc751e1bff809a9c Mon Sep 17 00:00:00 2001 From: Alexander Fuks Date: Sat, 6 Jul 2024 20:00:49 +0000 Subject: [PATCH] feat(dev): add tasks --- .gitignore | 1 + .vscode/settings.json | 12 +++++-- .vscode/tasks.json | 80 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 91 insertions(+), 2 deletions(-) create mode 100644 .vscode/tasks.json diff --git a/.gitignore b/.gitignore index 104d05318f3..5d05699cf60 100644 --- a/.gitignore +++ b/.gitignore @@ -21,6 +21,7 @@ package-lock.json .vscode/* !.vscode/settings.json !.vscode/extensions.json +!.vscode/tasks.json # Misc _sass/dist diff --git a/.vscode/settings.json b/.vscode/settings.json index 787a0c844ec..a530b3fb096 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -22,6 +22,14 @@ "scss.validate": false, "less.validate": false, // Stylint extension settings - "stylelint.snippet": ["css", "scss"], - "stylelint.validate": ["css", "scss"] + "stylelint.snippet": [ + "css", + "scss" + ], + "stylelint.validate": [ + "css", + "scss" + ], + // Environment variables + "jekyll_env.development": "JEKYLL_ENV=development" } diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 00000000000..69752fa870b --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,80 @@ +{ + // See https://go.microsoft.com/fwlink/?LinkId=733558 + // for the documentation about the tasks.json format + "version": "2.0.0", + "tasks": [ + { + "label": "Set env to development", + "hide": true, + "type": "shell", + "command": "set", + "args": [ + "${config:jekyll_env.development}" + ] + }, + { + "label": "Build (Jekyll)", + "type": "shell", + "command": "bundle", + "args": [ + "exec", + "jekyll", + "build" + ], + "problemMatcher": [], + "dependsOn": [ + "Set env to development" + ] + }, + { + "label": "Build (NodeJS)", + "type": "shell", + "command": "npm", + "args": [ + "run", + "build" + ], + "problemMatcher": [] + }, + { + "label": "Start watch (Jekyll)", + "type": "shell", + "command": "bundle", + "args": [ + "exec", + "jekyll", + "serve", + "--force_polling", + "--livereload" + ], + "problemMatcher": [], + "dependsOn": [ + "Set env to development" + ] + }, + { + "label": "Start watch (NodeJS)", + "type": "shell", + "command": "npm", + "args": [ + "run", + "watch:js" + ], + "problemMatcher": [] + }, + { + "label": "Start watch (Jekyll + NodeJS)", + "dependsOn": [ + "Start watch (NodeJS)", + "Start watch (Jekyll)" + ], + "group": { + "kind": "build", + "isDefault": true + }, + "runOptions": { + "runOn": "folderOpen" + } + } + ] +}