How to invoke executing a PowerShell script from gulp?

Question:

I am using gulp to build and deploy our application.

However after build I have to call a PowerShell script file “publish.ps1”, how can I call it in gulp?

Answer:

I haven’t tested this but if you combine the two it would look something like this. just run the default task, which uses run-sequence to manage the dependency order.

EDIT

Call a powershell file with parameters

Powershell file.ps1 in the root of your solution

Write-Host 'hello'

EDIT 2

OK, one more try. Can you put the params/arguments in file.ps1?

EDIT 3

Pass the params from the gulp task::

Update file.ps1 to remove

Source:

How to invoke executing a PowerShell script from gulp? by licensed under CC BY-SA | With most appropriate answer!

Leave a Reply