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

Integrate into automatic build #1

Open
renebuehling opened this issue Oct 4, 2019 · 1 comment
Open

Integrate into automatic build #1

renebuehling opened this issue Oct 4, 2019 · 1 comment

Comments

@renebuehling
Copy link

How could closureCompiler.compile be integrated into the build task so that it runs when build (Ctrl+Shift+B) is executed?

I identified the command names are closureCompiler.compileAll and closureCompiler.compile and there is some way of calling extension commands within a task with ${command:extension....} syntax (see here), but I can't get this running.

Example:

{
	"version": "2.0.0",
	"tasks": [
		{
			"label":"compile typescript",
			// The command is tsc. Assumes that tsc has been installed using npm install -g typescript
			"command": "tsc",
			"type": "shell",
			"presentation": {
				"echo": true,
				"reveal":"silent", // Show the output window only if unrecognized errors occur.
				"focus": false,
				"panel": "shared",
				"showReuseMessage": true,
				"clear": false
			},
			
			// Tell the tsc compiler to use the tsconfig.json from the open folder.
			"args": ["-p", "."],
			
			// use the standard tsc problem matcher to find compile problems
			// in the output.
			"problemMatcher": "$tsc",
			//"group": "build",
		}
		,
		{
			"label":"compile closure",
			"command":"${command:closureCompiler.compile}", //does not work
			"group":"build"
		}
		,
		{
			"label": "Build",
			"dependsOn": ["compile typescript", "compile closure"],
			"dependsOrder": "sequence",
			"group": "build",
		}

	],

}

"Build" is triggered which calls typescript compilation (ok) and then closure command. Closure is not working, giving this output in VSCode Output panel:

running command> ${command:closureCompiler.compile}
Failed to launch external program "${command:closureCompiler.compile}" .
spawn ${command:closureCompiler.compile} ENOEN

How to integrate closure correctly into tasks.json?

Thanks!

@karikera
Copy link
Owner

karikera commented May 23, 2020

I'm trying to add a task slowly, but don't expect it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants