Skip to content
This repository has been archived by the owner on Jul 27, 2022. It is now read-only.

Commit

Permalink
Add initial structure
Browse files Browse the repository at this point in the history
  • Loading branch information
JPRuskin committed Apr 12, 2018
1 parent d718142 commit f064e03
Show file tree
Hide file tree
Showing 7 changed files with 71 additions and 0 deletions.
28 changes: 28 additions & 0 deletions PowerShellTemplate.psd1
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
@{
ModuleVersion = "0.0.1"

# Modules that must be imported into the global environment prior to importing this module
RequiredModules = @()

# Functions to export. Populated by Optimize-Module during the build step.
FunctionsToExport = @()

# ID used to uniquely identify this module
GUID = 'af8481bc-5027-4bbf-a8bf-42ccadd4c885'
Description = 'The Questionmark PowerShell Template Module'

# The main script module that is automatically loaded as part of this module
RootModule = 'PowerShellTemplate.psm1'

# Common stuff for all our modules:
CompanyName = 'Questionmark Computing Limited'
Author = 'Team Forge'
Copyright = "Copyright 2018 Questionmark Computing Limited"

# Minimum version of the Windows PowerShell engine required by this module
PowerShellVersion = '5.1'
# Minimum version of the .NET Framework required by this module
DotNetFrameworkVersion = '4.0'
# Minimum version of the common language runtime (CLR) required by this module
CLRVersion = '4.0.30319'
}
4 changes: 4 additions & 0 deletions build.psd1
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@{
Path = "PowerShellTemplate.psd1"
CopyDirectories = "tests","data","README.md"
}
14 changes: 14 additions & 0 deletions classes/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# ModuleBase\classes

Contains classes, enums, and other prerequisites for the module (e.g. #using statements, constant variables, initialization code).

We use filenames with a two digit prefix, such that we can control the order they are added to the PSM1 by Optimize-Module.
This allows control of prerequisites, as in the case of ModuleFileClass which requires ModuleFileType to have been defined.

## Examples

- #using statements to load enums etc from another module
- Parameters for use within the module (e.g. Questionmark.Azure.Provisioning)
- Enums used for validation / tab-completion in function parameters (e.g. Questionmark.Configuration)
- Classes used for DSC (e.g. UpdateServicesServerDsc)
- Constants for use within the module (e.g. Questionmark.Legacy)
11 changes: 11 additions & 0 deletions data/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# ModuleBase\data

The data directory is optional, and is used to store files that are not a functional part of the module.

If included, the `build.psd1` should be modified to contain `CopyDirectories = 'data'`.

## Examples

- CSV or other data files containing information used by the module (e.g. Questionmark.Configuration)
- dotnet templates (e.g. PowerShellTemplate)
- XSLT files (e.g. Questionmark.EnvironmentVariables)
3 changes: 3 additions & 0 deletions private/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# ModuleBase\private

Contains private function files, for use within the module only.
3 changes: 3 additions & 0 deletions public/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# ModuleBase\public

Contains public function files, which will be exported from the module.
8 changes: 8 additions & 0 deletions tests/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# ModuleBase\tests

Contains Pester tests for PowerShell code in the module, and a Module.Tests.ps1 file.
The module tests file runs ScriptAnalyzer tests against the module.

The function tests have been split into directories for each of the directories in source folder (classes, private, public), for ease of identification.

There is a data folder that can contain additional files for use during testing.

0 comments on commit f064e03

Please sign in to comment.