Skip to content
/ vshelper Public

CLI tool to configure VSCode projects and tasks from customizable settings.json and task.json files

License

Notifications You must be signed in to change notification settings

kcmr/vshelper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VS project helper

A CLI tool to configure a directory as a Visual Studio Code project with typical settings for a Web Component using Polymer, a Polymer app or your own project types.

Motivation

Unfortunately, Visual Studio Code does not have at the moment global tasks, task templates or something similar, so I usually find myself copying and pasting settings and tasks from project to project.

This script simply copies a basic predefined settings.json and tasks.json files into the current directory by executing the vsproject command.

The default settings and tasks are meant for Web Components and apps using Polymer, but you can customize your tasks and project types to suit your own needs.

Install

npm install -g vsproject

Usage

In a component (default type)

vsproject

In an app

vsproject --type app

Customize settings, tasks and project types

You can use your own predefined set of tasks or settings by placing a settings.json and/or tasks.json file inside a folder named as the type of project you want to set (eg.: component (default), app, your-own-project-type) in ~/.vscode/vsproject/<your-project-type>/.

Example:

The following tasks.json template will be used for "dummy" projects:

In ~/.vscode/vsproject/dummy/tasks.json:

{
  // my own tasks for dummy projects
}

In your project directory:

$ vsproject --type dummy

Running tasks in VSCode

Show the command palette (Cmd+P) and type task followed by a space to show the available tasks.

Additionally you can set your own custom key shortcut to show the project tasks by adding the following to your keybindings.json:

{
    "key": "ctrl+t", // your own keybinding
    "command": "workbench.action.tasks.runTask"
}

Demo

About

CLI tool to configure VSCode projects and tasks from customizable settings.json and task.json files

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published