SPFramework: Basics

SPFramework: Basics

Before start

Every Comment Based Section generated with framework will be filled with values stored in „config.txt” or „config_local.txt” file. Author and project entries are optional and can be removed or commented by adding # at beginning of lines.

TIP 1: Authors name is always generated as first in Comment Based Help Notes sections so it is recommended to use author.name key by default.

TIP 2: Local configuration file will be loaded by default if exists. If not basic configuration file will be loaded.

TIP 3: Project name section is the name for mounting working directory.

How to start

Pic.1 SPFramework

Open Init.ps1 with PowerShell ISE and press F5 or go to framework path and type:

PS> .\Init.ps1

It is possible to start framework and open existing file for edit. Just provide file name if script is stored in frameworks root directory or file path with file name if location is different.

PS> .\Init.ps1 <file>

TIP 4: If file does not exist it will be created with no content.

There is option to load framework libraries and create file with prepared function scheme:

PS> .\Init.ps1 <file> <function_name>

Function can also be generated with comment based section just add -CommentBasedHelp switch:

PS> .\Init.ps1 <file> <function_name> -CommentBasedHelp

Script can also mount frameworks root directory and use it as working directory by adding -Auto parameter to any above command.

PS>.\Init.ps1 -Auto

Dodaj komentarz

Twój adres e-mail nie zostanie opublikowany.

*