-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'fix/sourcetype-map' into release/v0.1.2
- Loading branch information
Showing
15 changed files
with
561 additions
and
265 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,93 @@ | ||
<# | ||
The map identifies a path => SourceItem Properties | ||
The path root is the Source directory | ||
There are three "top level keys": | ||
- FileTypes: This identifies which files are considered SourceItems. Each key represents a file extension and | ||
its value is the FileTypes property of the object | ||
- Path: An array of values where each index represents a "level" of subfolder below the root | ||
Each index can be either a "Field Name" or a hashtable of regular expressions with Field Name => value. | ||
Value can be a regex match group | ||
- Name: A hashtable of regular expressions with Field Name => value. | ||
Value can be a regex match group | ||
#> | ||
|
||
@{ | ||
'public' = @{ Visibility = 'public'; Type = 'function' } | ||
'class' = @{ Visibility = 'private'; Type = 'class' } | ||
'classes' = @{ Visibility = 'private'; Type = 'class' } | ||
'enum' = @{ Visibility = 'private'; Type = 'enum' } | ||
'private' = @{ Visibility = 'private'; Type = 'function' } | ||
'tasks' = @{ Visibility = 'public' ; Type = 'task' } | ||
'resource' = @{ Visibility = 'private'; Type = 'resource' } | ||
'assembly' = @{ Visibility = 'private'; Type = 'resource' } | ||
'assemblies' = @{ Visibility = 'private'; Type = 'resource' } | ||
'data' = @{ Visibility = 'private'; Type = 'resource' } | ||
FileTypes = @{ | ||
'\.ps1$' = @{ | ||
FileType = 'PowerShell File' | ||
} | ||
'\.eps1$' = @{ | ||
FileType = 'Embedded PowerShell' | ||
Type = 'template' | ||
|
||
} | ||
'\.psd1$' = @{ | ||
FileType = 'PowerShell Data File' | ||
Type = 'data' | ||
} | ||
'\.psm1$' = @{ | ||
FileType = 'PowerShell Module File' | ||
Type = 'module' | ||
Visibility = 'public' | ||
} | ||
} | ||
|
||
<# | ||
An example path (relative to the source directory): | ||
Path : Module1/public/Engine/Start-RocketEngine.ps1 | ||
Level : 0 1 2 3 | ||
#> | ||
Path = @( | ||
# Level 0 | ||
'Module', | ||
# Level 1 | ||
@{ | ||
'^private' = @{ | ||
Visibility = 'private' | ||
Type = 'function' | ||
} | ||
'^public' = @{ | ||
Visibility = 'public' | ||
Type = 'function' | ||
} | ||
'^enum' = @{ | ||
Visibility = 'private' | ||
Type = 'enum' | ||
} | ||
'operations' = @{ | ||
Visibility = 'private' | ||
Type = 'operation' | ||
} | ||
}, | ||
# Level 2 | ||
@{ | ||
# does not have a '.' in the word | ||
# '(^[^.]+$)' = @{ | ||
'{t.dir}' = @{ | ||
Component = '{n}' | ||
} | ||
} | ||
) | ||
Name = @{ | ||
'Configuration\.psd1' = @{ | ||
FileType = 'Module Configuration' | ||
Visibility = 'private' | ||
Type = 'Settings' | ||
} | ||
'(\w+)-(\w+)' = @{ | ||
Verb = '{1}' | ||
Noun = '{2}' | ||
} | ||
'(.*?)\.task' = @{ | ||
Visibility = 'public' | ||
Type = 'task-file' | ||
Name = '{1}' | ||
} | ||
'(.*?)\.build' = @{ | ||
Visibility = 'public' | ||
Type = 'build-script' | ||
Name = '{1}' | ||
} | ||
} | ||
|
||
} |
Oops, something went wrong.