PowerShell / SHiPS

Simple Hierarchy in PowerShell - developing PowerShell provider got so much easier
MIT License
185 stars 31 forks source link

Add a list of projects using SHiPS #90

Open jzabroski opened 6 years ago

jzabroski commented 6 years ago

Even a link to this GitHub search for code samples is helpful.

Right now the documentation is a bit confusing, and it isn't clear how to get started using SHiPS from the FamilyTree demo; I only figured it out after going to the FAQ and seeing this line:

new-psdrive -name yourdrivename -psprovider SHiPS -root `yourmodule#yourtype

Which has led me to realize that YourType is likely a class deriving from SHiPSDirectory class. But this isn't explained anywhere that I can find. You have to read the code to figure that out.

Also, the more logical thing is to encourage PowerShell projects to create a separate module, PSDrive, that references . e.g., Import-Module AzurePSDrive should import module named Azure.

jianyunt commented 6 years ago

@jzabroski thank you for your feedback. I guess I put some info in the SHiPS github readme and some info are added into the getstarted doc. I will find some time to update them. Also always welcome PRs from the community.

Regarding new-psdrive -name yourdrivename -psprovider SHiPS -root yourmodule#yourtype

SHiPS itself is a PowerShell provider. It allows people to write navigation experence in PowerShell classes. The actual data retrieval gets done in PowerShell classes. SHiPS defined two types: SHiPSDirectory and SHiPSLeaf. SHiPSDirectory is for directory or folder, SHiPSLeaf is equivalent to the "file", as mentioned in key take away in the GetStarted doc

"Azure" in AzurePSDrive module is the name of PowerShell class. It's a root drive in this case. The root needs to be defined in your main module, in this case AzurePSDrive.

rchaganti commented 6 years ago

I created a PS drive of PS drives (for a demo at #PSConfEU). https://github.com/rchaganti/PSProvidersDrive

The data for the PSDrives is from a JSON file. Feel free to send in a pull request if I am missing something.

I plan on implementing the classes in a way we can pipe the object to Install-Module to get the drive module from the PS Gallery or even download the module ZIP from GitHub and extract it locally.