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..f78d730385e --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,76 @@ +{ + // 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" + ], + "dependsOn": [ + "Set env to development" + ] + }, + { + "label": "Build (NodeJS)", + "type": "shell", + "command": "npm", + "args": [ + "run", + "build" + ] + }, + { + "label": "Start watch (Jekyll)", + "type": "shell", + "command": "bundle", + "args": [ + "exec", + "jekyll", + "serve", + "--force_polling", + "--livereload" + ], + "dependsOn": [ + "Set env to development" + ] + }, + { + "label": "Start watch (NodeJS)", + "type": "shell", + "command": "npm", + "args": [ + "run", + "watch:js" + ] + }, + { + "label": "Start watch (Jekyll + NodeJS)", + "dependsOn": [ + "Start watch (NodeJS)", + "Start watch (Jekyll)" + ], + "group": { + "kind": "build", + "isDefault": true + }, + "runOptions": { + "runOn": "folderOpen" + } + } + ] +}