Skip to content

Instantly share code, notes, and snippets.

@baetheus
Created January 17, 2019 01:25
Show Gist options
  • Select an option

  • Save baetheus/3454d94da0c4e78640a1f30bd4abe74b to your computer and use it in GitHub Desktop.

Select an option

Save baetheus/3454d94da0c4e78640a1f30bd4abe74b to your computer and use it in GitHub Desktop.
vscode tasks for schematics-react
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
// Run npm start as default build script (cmd + shift + b)
{
"label": "start",
"type": "npm",
"script": "start",
"isBackground": true,
"problemMatcher": [],
"group": {
"kind": "build",
"isDefault": true
}
},
// Run prompts to create new components (manually bind hotkey to cmd + shift + t)
// https://github.com/baetheus/schematics-react
// Requires: npm i -g @angular-devkit/schematics-cli @nll/schematics-react
{
"label": "Create Component",
"type": "shell",
"command": "schematics @nll/schematics-react:component --path=${input:componentPath} --name=\"${input:componentName}\"",
"problemMatcher": []
}
],
"inputs": [
{
"id": "componentName",
"description": "Please Enter A Component Name",
"default": "SomeComponent",
"type": "promptString"
},
{
"id": "componentPath",
"description": "Select Location",
"default": "src/components",
"type": "pickString",
"options": ["src/components", "src/pages"]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment