In PowerShell Stuidio be able to run "New Module from Functions" from the command line

Post feature requests, product enhancement ideas, and other product-specific suggestions here. Do not post bug reports.
Forum rules
Do not post any licensing information in this forum.
Locked
User avatar
cmonahan
Posts: 4
Joined: Tue Nov 03, 2015 10:43 am

In PowerShell Stuidio be able to run "New Module from Functions" from the command line

Post by cmonahan »

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

Bosparan
Posts: 282
Joined: Sun Mar 03, 2013 12:45 pm

Re: In PowerShell Stuidio be able to run "New Module from Functions" from the command line

Post by Bosparan »

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:
  1. Install-Module PSModuleDevelopment
  2.  
  3. Get-Help New-PssModuleProject -Detailed
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

Locked