Skip to content

Commit

Permalink
Merge branch 'windows-setting-time' of https://github.com/Gijsreyn/wi…
Browse files Browse the repository at this point in the history
…nget-dsc into windows-setting-time
  • Loading branch information
Gijsreyn committed Dec 7, 2024
2 parents 02fba3f + 1c6bc34 commit 9be2b65
Show file tree
Hide file tree
Showing 47 changed files with 1,824 additions and 107 deletions.
25 changes: 25 additions & 0 deletions .github/actions/spelling/allow.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,28 @@ pscustomobject
VGpu
wildcards
worktree
aspnetcore
bbwe
devdocs
echarts
ephemoral
Fancyzones
gdk
JDK
jquery
Mfor
msixbundle
NVM
powertoys
reduxjs
restsource
seperated
tastejs
todomvc
videojs
vsconfig
websites
wekyb
Hmmss
MMdd
MMdd
4 changes: 4 additions & 0 deletions .github/actions/spelling/expect/generic_terms.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,9 @@ ssh
usr
versioning
VGpu
<<<<<<< HEAD

Check warning on line 22 in .github/actions/spelling/expect/generic_terms.txt

View workflow job for this annotation

GitHub Actions / Check Spelling

Ignoring entry because it contains non-alpha characters. (non-alpha-in-dictionary)
Ntp
Systray
=======

Check warning on line 25 in .github/actions/spelling/expect/generic_terms.txt

View workflow job for this annotation

GitHub Actions / Check Spelling

Ignoring entry because it contains non-alpha characters. (non-alpha-in-dictionary)

Check warning on line 25 in .github/actions/spelling/expect/generic_terms.txt

View workflow job for this annotation

GitHub Actions / Check Spelling

Ignoring entry because it contains non-alpha characters. (non-alpha-in-dictionary)
ADDLOCAL
>>>>>>> b9c45c87b2a62b479e107979ab3714073a765e8e

Check warning on line 27 in .github/actions/spelling/expect/generic_terms.txt

View workflow job for this annotation

GitHub Actions / Check Spelling

Ignoring entry because it contains non-alpha characters. (non-alpha-in-dictionary)

Check warning on line 27 in .github/actions/spelling/expect/generic_terms.txt

View workflow job for this annotation

GitHub Actions / Check Spelling

Ignoring entry because it contains non-alpha characters. (non-alpha-in-dictionary)
3 changes: 2 additions & 1 deletion .github/actions/spelling/expect/software.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ dotnet
dotnettool
NUnit
reportgenerator
markdownlint
markdownlint
msiexec
3 changes: 3 additions & 0 deletions .github/actions/spelling/patterns.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,6 @@ name\:\s+.+$

# Github User Content
/[-a-z0-9]+\.githubusercontent\.com/[-a-zA-Z0-9?&=_\/.]*

# GitHub SHAs (markdown)
(?:\[`?[0-9a-f]+`?\]\(https:/|)/(?:www\.|)github\.com(?:/[^/\s"]+){2,}(?:/[^/\s")]+)(?:[0-9a-f]+(?:[-0-9a-zA-Z/#.]*|)\b|)
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# DSC Resources for WinGet Configuration

This project is intended to support WinGet Configuration. Some of these Desired State Configuration (DSC) Resources are exploratory and may not be published in the PowerShell Gallery. Other resources may be moved to their own projects or removed entirely. [Samples](https://aka.ms/dsc.yaml) for using these resources are available in the [Dev Home](https://github.com/microsoft/devhome) repository.
This project is intended to support WinGet Configuration. Some of these Desired State Configuration (DSC) Resources are exploratory and may not be published in the PowerShell Gallery. Other resources may be moved to their own projects or removed entirely. Samples for using these resources are available in the [samples](./samples/) directory. They are also available via the URL: `https://aka.ms/dsc.yaml`

## Contributing

Expand Down
54 changes: 54 additions & 0 deletions resources/Help/NpmDsc/NpmPackage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
external help file: NpmDsc.psm1-Help.xml
Module Name: NpmDsc
ms.date: 11/16/2024
online version:
schema: 2.0.0
title: NpmPackage
---

# NpmPackage

## SYNOPSIS

The `NpmPackage` DSC Resource allows you to manage the installation, update, and removal of npm packages. This resource ensures that the specified npm package is in the desired state.

## DESCRIPTION

The `NpmPackage` DSC Resource allows you to manage the installation, update, and removal of npm packages. This resource ensures that the specified npm package is in the desired state.

## PARAMETERS

| **Parameter** | **Attribute** | **DataType** | **Description** | **Allowed Values** |
| ------------------ | -------------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------- |
| `Ensure` | Optional | String | Specifies whether the npm package should be present or absent. The default value is `Present`. | `Present`, `Absent` |
| `Name` | Key, Mandatory | String | The name of the npm package to manage. This is a key property. | Any valid npm package name |
| `Version` | Optional | String | The version of the npm package to install. If not specified, the latest version will be installed. | Any valid version string (e.g., `4.17.1`) |
| `PackageDirectory` | Optional | String | The directory where the npm package should be installed. If not specified, the package will be installed in the current directory. | Any valid directory path |
| `Global` | Optional | Boolean | Indicates whether the npm package should be installed globally. The default value is `$false`. | `$true`, `$false` |

## EXAMPLES

### EXAMPLE 1 - Install React package in default directory

```powershell
PS C:\> Invoke-DscResource -ModuleName NpmDsc -Name NpmPackage -Method Set -Property @{ Name = 'react' }
# This example installs the npm package 'react' in the current directory.
```

### EXAMPLE 2 - Install Babel package in global directory

```powershell
PS C:\> Invoke-DscResource -ModuleName NpmDsc -Name NpmPackage -Method Set -Property @{ Name = 'babel'; Global = $true }
# This example installs the npm package 'babel' globally.
```

### EXAMPLE 3 - Get WhatIf result for React package

```powershell
PS C:\> ([NpmPackage]@{ Name = 'react' }).WhatIf()
# This example returns the whatif result for installing the npm package 'react'. Note: This does not actually install the package and requires the module to be imported using 'using module <moduleName>'.
```
Loading

0 comments on commit 9be2b65

Please sign in to comment.