Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run task on save? #2159

Closed
glen-84 opened this issue Jan 21, 2016 · 6 comments
Closed

Run task on save? #2159

glen-84 opened this issue Jan 21, 2016 · 6 comments
Assignees
Labels
tasks Task system issues
Milestone

Comments

@glen-84
Copy link

glen-84 commented Jan 21, 2016

I've written this task for sass-lint – is it possible to run it automatically when I save a *.scss file?

{
    "version": "0.1.0",
    "command": "sass-lint",
    "isShellCommand": true,
    "args": ["-c", "path/to/.sass-lint.yml", "-v", "${file}"],
    "showOutput": "silent",
    "problemMatcher": {
        "owner": "sass",
        "fileLocation": "absolute",
        "pattern": [
            {
                "regexp": "^([^\\s].*)$",
                "file": 1
            },
            {
                "regexp": "^\\s+(\\d+):(\\d+)\\s+(error|warning|info)\\s+(.*)\\s\\s+(.*)$",
                "line": 1,
                "column": 2,
                "severity": 3,
                "message": 4,
                "code": 5,
                "loop": true
            }
        ]
    }
}
@weinand weinand added the *question Issue represents a question, should be posted to StackOverflow (VS Code) label Jan 22, 2016
@felixfbecker
Copy link
Contributor

Thats what you would use watch tasks for

@dbaeumer dbaeumer added tasks Task system issues feature-request Request for new features or functionality and removed *question Issue represents a question, should be posted to StackOverflow (VS Code) labels Jan 22, 2016
@dbaeumer dbaeumer added this to the Backlog milestone Jan 22, 2016
@Ciantic
Copy link

Ciantic commented Feb 26, 2016

I don't agree watch is always a good choice, especially since if you have watch running you can't execute other tasks without terminating.

Also creating another process just for watching less, sass is a overkill, it would be a better if IDE could be made to trigger the task when certain filetype changed, like:

{
    "triggerOnSaving" : "*.sass",
    "args": ["-c", "path/to/.sass-lint.yml", "-v", "${file}"],
    ...
}

@domaa11
Copy link

domaa11 commented Jan 31, 2017

@Ciantic
Copy link

Ciantic commented Jan 31, 2017

@domaa11 It does the trick, but one must duplicate all tasks to separate file. Maybe if it were rewritten to run tasks on saving it would do exactly that.

@dbaeumer
Copy link
Member

We have plans to support running multiple tasks in parallel. So such a watch task would not blocking running other tasks anymore.

@dbaeumer
Copy link
Member

Watching tasks should be implemented using watch support of exist task runners. Always starting a task on save is not very performant nor battery friendly.

With task 2.0.0 you can run multiple tasks in parallel. So I will close the issue.

@dbaeumer dbaeumer removed the feature-request Request for new features or functionality label Nov 10, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Dec 25, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
tasks Task system issues
Projects
None yet
Development

No branches or pull requests

6 participants