Skip to content

Instantly share code, notes, and snippets.

@GuillaumeLebeau
Last active August 11, 2023 13:33
Show Gist options
  • Save GuillaumeLebeau/d59269b731f544982f43ec5b7785b0d4 to your computer and use it in GitHub Desktop.
Save GuillaumeLebeau/d59269b731f544982f43ec5b7785b0d4 to your computer and use it in GitHub Desktop.
PowerShell aliases for Yarn
#
# Module manifest for module 'yarn'
#
# Generated by: Guillaume Lebeau
#
# Generated on: 01-Oct-17
#
@{
# Version number of this module.
ModuleVersion = '0.1.00'
# Script module or binary module file associated with this manifest.
RootModule = 'yarnProfile.psm1'
# ID used to uniquely identify this module
GUID = '0a468e6b-0d71-47f9-a07b-5d8cee9977bf'
# Company or vendor of this module
CompanyName = 'Unknown'
# Author of this module
Author = 'Guillaume Lebeau'
# Copyright statement for this module
Copyright = '(c) 2017 Guillaume Lebeau. All rights reserved.'
# Description of the functionality provided by this module
Description = 'Yarn shortcuts for PowerShell'
# Minimum version of the Windows PowerShell engine required by this module
PowerShellVersion = '5.0'
# List of all files packaged with this module
FileList = @('yarnProfile.psm1')
# Cmdlets to export from this module
CmdletsToExport = @()
# Variables to export from this module
VariablesToExport = @()
# Aliases to export from this module
AliasesToExport = '*'
# Functions to export from this module
FunctionsToExport = @('Install-YarnPackage', 'Add-YarnPackage', 'Add-YarnPackageDev', 'Add-YarnPackageGlobal', 'Remove-YarnPackage', 'Remove-YarnPackageGlobal', 'Invoke-YarnPackageRun', 'Get-YarnPackageOutdated', 'Update-YarnPackage', 'Invoke-YarnPackageRunStart', 'Invoke-YarnPackageRunTest')
# Private data to pass to the module specified in RootModule. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
PrivateData = @{
PSData = @{
# Tags applied to this module. These help with module discovery in online galleries.
Tags = @('yarn')
} # End of PSData hashtable
} # End of PrivateData hashtable
}
if (Get-Module yarnProfile) { return }
function Install-YarnPackage { yarn install --emoji @Args }
New-Alias yi Install-YarnPackage
function Add-YarnPackage { yarn add @Args --emoji }
New-Alias ya Add-YarnPackage
function Add-YarnPackageDev { yarn add --emoji --dev @Args }
New-Alias yad Add-YarnPackageDev
function Add-YarnPackageGlobal { yarn global add --emoji @Args }
New-Alias yag Add-YarnPackageGlobal
function Remove-YarnPackage { yarn remove @Args --emoji }
New-Alias yrm Remove-YarnPackage
function Remove-YarnPackageGlobal { yarn global remove --emoji @Args }
New-Alias yrmg Remove-YarnPackageGlobal
function Invoke-YarnPackageRun { yarn run --emoji @Args }
New-Alias yr Invoke-YarnPackageRun
function Get-YarnPackageOutdated { yarn outdated --emoji @Args }
New-Alias yout Get-YarnPackageOutdated
function Update-YarnPackage { yarn upgrade --emoji @Args }
New-Alias yup Update-YarnPackage
function Invoke-YarnPackageRunStart { yarn run --emoji start @Args }
New-Alias ys Invoke-YarnPackageRunStart
function Invoke-YarnPackageRunTest { yarn run --emoji test @Args }
New-Alias yt Invoke-YarnPackageRunTest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment