Functions/New-NodePackageDetails.ps1
<#
.SYNOPSIS This function returns a JSON containing the Node package details. #> function New-NodePackageDetails { [CmdletBinding(PositionalBinding=$false)] [OutputType([String])] param ( # The name of the Node package. [Parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] [String]$name, # The description of the Node package. [Parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] [String]$description ) return @{ name = $name version = "1.0.0" description = $description main = "$($name).js" scripts = @{ test = "echo 'Error: no test specified' && exit 1" } private = $true author = "BitTitan" license = "ISC" dependencies = @{ "puppeteer" = "1.4.0" } } | ConvertTo-Json } |