majkinetor / id

Install dependencies via Powershell packages.ps1 file
GNU General Public License v2.0
2 stars 0 forks source link

Before/After script #3

Open majkinetor opened 6 years ago

majkinetor commented 6 years ago

Could be used to set up config, i.e.

"nodejs.install" = @{ 
                    Repository = 'Chocolatey'
                    Tags = 'site', 'develop', 'preview'
                    Version = '9.0.0'
                    AfterScript = { 
                        $Env:npm_config_registry = "http://registry.npmjs.org/"
                        $Env:npm_config_strict_ssl = 'false' 
                    }

"browser-sync"   = @{ Repository = 'Nodejs';     Tags = 'site', 'develop', 'preview' }
majkinetor commented 6 years ago

Could also add scripts to be executed on arbitrary place:

[ordered]@{
    AddProxy = {
            $Env:http_proxy = ...
    }   
    AddProxy = {  $PSScriptRoot\scripts\proxyc.ps1 -FromSystem }  
    AddProxy = '$PSScriptRoot\scripts\proxyc.ps1 -FromSystem'  

    package1 = @{ }
    ...

    SetNode = { npm config ... }
}