Skip to content

Commit 015d406

Browse files
committed
Changed from CopyMode to ResourceCopyMode
1 parent 61e9547 commit 015d406

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ The `resources` folder within the `src` directory is intended for including any
8585

8686
When the module is built, the contents of the `src/resources` folder will be copied directly to the `dist` folder. If the `src/resources` folder contains any subfolders, those subfolders and their contents will also be included in the `dist` folder, ensuring that all necessary files are available for the module to function correctly.
8787

88-
How the resources folder gets copied to the "OutputModuleDir" folder will depends on the "CopyMode" project setting. When missing or set to "Folder", the resources folder will be copied. When "CopyMode" is set to "Content", then only the content of the resources folder will be copied.
88+
How the resources folder gets copied to the "OutputModuleDir" folder will depends on the "ResourceCopyMode" project setting. When missing or set to "Folder", the resources folder will be copied. When "ResourceCopyMode" is set to "Content", then only the content of the resources folder will be copied.
8989

9090
Leave `src\resources` empty if there is no need to include any additional content in the `dist` folder.
9191

@@ -127,10 +127,10 @@ New-MTModule ~/Work
127127

128128
`ModuleTools` is designed so that you don't need any additional tools like `make` or `psake` to run the build commands. There's no need to maintain complex `build.ps1` files or sample `.psd1` files. Simply follow the structure outlined above, and you can run `Invoke-MTBuild` to build the module. The output will be saved in the `dist` folder, ready for distribution.
129129

130-
The Invoke-MTBuild CmdLet includes a step where the resources folder and/or it's contents are copied to the "OutputModuleDir" folder. This is controlled by the optional "CopyMode" project setting.
130+
The Invoke-MTBuild CmdLet includes a step where the resources folder and/or it's contents are copied to the "OutputModuleDir" folder. This is controlled by the optional "ResourceCopyMode" project setting.
131131

132-
If "CopyMode" = 'Folder or if it's missing, the entire resources folder gets copied to the "OutputModuleDir" folder.
133-
If "CopyMode" = 'Content', only the content of the resources folder gets copied to the "OutputModuleDir" folder.
132+
If "ResourceCopyMode" = 'Folder or if it's missing, the entire resources folder gets copied to the "OutputModuleDir" folder.
133+
If "ResourceCopyMode" = 'Content', only the content of the resources folder gets copied to the "OutputModuleDir" folder.
134134

135135
```powershell
136136
# From the Module root

project.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"ProjectName": "ModuleTools",
33
"Description": "ModuleTools is a versatile, standalone PowerShell module builder. Create anything from simple to robust modules with ease. Built for CICD and Automation.",
44
"Version": "0.0.10",
5-
"CopyMode": "Folder",
5+
"ResourceCopyMode": "Folder",
66
"Manifest": {
77
"Author": "Manjunath Beli",
88
"PowerShellHostVersion": "7.4",

src/private/CopyProjectResource.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ function Copy-ProjectResource {
22
$data = Get-MTProjectInfo
33
$resFolder = [System.IO.Path]::Join($data.ProjectRoot, 'src', 'resources')
44
if (Test-Path $resFolder) {
5-
if ($data.CopyMode -eq 'Content') {
5+
if ($data.ResourceCopyMode -eq 'Content') {
66
# Copy the resources folder content to the OutputModuleDir
77
$items = Get-ChildItem -Path $resFolder -ErrorAction SilentlyContinue
88
if ($items) {

src/resources/ProjectTemplate.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"ProjectName": "",
33
"Description": "",
44
"Version": "",
5-
"CopyMode": "",
5+
"ResourceCopyMode": "",
66
"Manifest": {
77
"Author": "",
88
"PowerShellHostVersion": "",

src/resources/Schema-Build.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"Version": {
1313
"type": "string"
1414
},
15-
"CopyMode": {
15+
"ResourceCopyMode": {
1616
"type": "string"
1717
},
1818
"Manifest": {

0 commit comments

Comments
 (0)