Skip to content

Latest commit

 

History

History
98 lines (65 loc) · 3.33 KB

development.md

File metadata and controls

98 lines (65 loc) · 3.33 KB

AutoRest PowerShell Generator - Development

Requirements

Use of this project requires the following:

  • NodeJS LTS (currently 14.15.5)
    I recommend that you use a tool like nvs so that you can switch between versions of node without pain
     
  • AutoRest v3
    npm install -g autorest@latest
     
  • RushJS manages multiple nodejs projects in a single repository.
    npm install -g @microsoft/rush
     
  • PowerShell 6.0 - If you dont have it installed, you can use the cross-platform npm package
    npm install -g pwsh
     
  • Dotnet SDK 2 or greater - If you dont have it installed, you can use the cross-platform npm package
    npm install -g dotnet-sdk-2.1
     
  • Recommended: Visual Studio Code

Cloning this repository

# clone recursively
git clone https://github.com/azure/autorest.powershell

# one-time
cd autorest.powershell
npm install

Using RushJS

This repository is built as a 'monorepo' using RushJS - which manages multiple nodejs projects in a single repository.

# install nodejs modules for all projects in the monorepo
rush update

Rush is used to make sure that package versions are consistent between sub-projects

# ensure all projects are using the same versions
rush sync-versions

# install modules 
rush update

Compiling

Rush is used to build autorest.powershell

# build everything
rush rebuild

You can use watch to compile when a file is changed, which will rebuild dependencies automatically. Just kill the process with ctrl-c to stop it.

# start watching 
rush watch

Using your locally built version of autorest.powershell

To use the locally built version of the plugin, add --use:<path> to the command line

# using a local build
> autorest --use:c:/work/autorest.powershell <...arguments>

Debugging

  1. Start generating: autorest --use:C:\path\to\local\autorest.powershell --powershell.debugger. It will wait for debugger to attach.
  2. Start debugging: open autorest.powershell repo in vscode; press F5. You will see "Debugger attached." in your autorest console, then you can start debugging.

Testing

COMING SOON.

Contributing

Contributor License Agreement Requirements

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.