Giter Club home page Giter Club logo

phosphor's Introduction

Phosphor

Build status

Phosphor is PowerShell module designed for generating user interfaces from PowerShell modules.

Disclaimer

This project is to be considered a proof-of-concept and not a supported Microsoft product.

Also, certain things will not work correctly yet because this project was developed in the lead-up to the PowerShell and DevOps Global Summit. Things will improve rapidly in the very near future.

Goals

This project has a few short-term goals:

  • Provide a proof-of-concept cross-platform version of Out-GridView and Show-Command
  • Provide a proof-of-concept administration UI generated solely from PowerShell modules

We also have aspirational, long-term goals for a more fully-established project along these lines:

  • Implement a core algorithm that can scan PowerShell modules and extract the necessary details for building a functional user interface
  • Establish a generalized UI model which will provide a blueprint for PowerShell-based user interfaces in any platform or UI framework
  • Provide a standard, self-hostable HTML UI frontend for quick and easy display of a generated user interface based on a target module or set of modules.
  • Enable UI integration hooks so that generated UI can be seamlessly integrated into existing crafted UI
  • Provide script generation for operations exposed in the UI so that users can learn how to automate the tasks that they have performed
  • Respect RBAC and JEA constraints so that UI can be generated for users that should not have full access to the target machine

These goals may be changed or clarified over time. Please feel free to file issues if you have further ideas or requirements for this project.

Building and Using the Code

Using the build script

  1. Make sure Node.js 6.10.2 with NPM is installed and on your PATH

  2. Install Invoke-Build using the PowerShell Gallery:

    Install-Module InvokeBuild -Scope CurrentUser
  3. Run the following command to build and run the module

    Invoke-Build RunModule
  4. You can build the module and UI without running it by running the following command:

    Invoke-Build Build

Building the project manually

These steps are not recommended, you should use the build script unless you have a good reason to build manually.

  1. Make sure .NET SDK 1.0 and Node.js 6.10.2 with NPM are installed and on your PATH

  2. Restore the Phosphor module dependencies:

    dotnet restore ./src/Phosphor
    
  3. Run the following commands to compile a "publish" build of the module:

    On Windows

    dotnet publish -f net451 .\src\Phosphor
    dotnet publish -f netstandard1.6 .\src\Phosphor
    

    On Linux and macOS

    dotnet publish -f netstandard1.6 ./src/Phosphor
    
  4. Build the UI code by running the following commands:

    cd src/Phosphor.Client
    npm install
    npm run tsc
    
  5. Start up a fresh instance of PowerShell for testing purposes as the module will need to be completely unloaded before you can compile the code again.

  6. Import the module:

    Import-Module ./src/Phosphor/Phosphor.psd1
  7. Call the Show-Module command to start the module browser:

    # Show all modules
    Show-Module
    
    # Show specific modules
    Show-Module -Module PowerShellGet, PackageManagement

Maintainers

License

This project is licensed under the MIT License. Please see the [third-party notices](Third Party Notices.txt) file for details on the third-party binaries that we include with releases of this project.

phosphor's People

Contributors

developertommy avatar daviwil avatar xainey avatar irwins avatar

Stargazers

Classic Values avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.