Hi,
I have a lot of utility function for our VMware environment that I started packaging into a module for convenience, so I didn't have to dot source individual file. It would also be easier to distribute to the rest of the team. I keep all the functions as one function per ps1 file for easy editing and git tracking. I update individual functions often enough that this would be a time/click saver.
My workflow is:
1- Edit the single file function.ps1
2- Commit to git
3- Run "New Module from Functions" from the gui. (This would be changed to "from the commandline".)
4- Copy the new module files to the file share for general use
Desired features:
1- Specify a directory with a recurse option for the list of functions to add.
2- Pass a text file of file paths for the list of functions to add.
3- Optional- Maybe a config/project file to specify the options.
4- Be able to set the module version. Optionally auto-increment the version.
5- Add other module manifest information. Maybe the suggested config/project file would be a good place to store that.
6- Optionally update an existing module instead of rebuilding from scratch. Only the function would be replaced and the module version incremented.
Thank you,
Chris
In PowerShell Stuidio be able to run "New Module from Functions" from the command line
Forum rules
Do not post any licensing information in this forum.
Do not post any licensing information in this forum.
Re: In PowerShell Stuidio be able to run "New Module from Functions" from the command line
Hi Chris,
I hear ya. In fact, it's on my own wishlist.
In the meantime, you can use a helper function I published to alleviate some of the pain:
It basically either creates an empty module project, or converts an existing module (such as your local github repo) into a filled out Module Project.
Cheers,
Fred
I hear ya. In fact, it's on my own wishlist.
In the meantime, you can use a helper function I published to alleviate some of the pain:
- Install-Module PSModuleDevelopment
- Get-Help New-PssModuleProject -Detailed
Cheers,
Fred