The shortest way to prepare your local copy of the project for development and testing.
Before you start contributing to this project, you will need Node.js. This project has been tested with the LTS version of Node.js and the version of NPM that comes with it.
- fork this repository
- clone your fork
- in the command line:
- run
npm i
to restore dependencies - run
npm run build
to build the project - run
npm test
to run test and check current code coverage - run
npm link
to install the project locally. This is useful if you want to test your changes to the CLI in the CLI itself. After linking the local package, you can start your local version of the CLI by typing in the command lineoffice365
.
- run
If you installed the CLI globally using the
npm i -g @pnp/office365-cli
command, we recommend that you uninstall it first, before runningnpm link
After changing the code, run the npm run build
command to rebuild the project and see your changes integrated in the local version of the CLI.
If you renamed files:
- in the command line:
- run
npm run clean
to clean up the output folder - run
npm run build
to rebuild the project - run
npm link
to reinstall the project locally. Without this step, you will get an error, when trying to start the local version of the CLI.
- run
Office 365 CLI uses MkDocs to publish documentation pages. See more information about installing MkDocs on your operating system at http://www.mkdocs.org/#installation.
Once you have MkDocs installed on your machine, in the command line:
- run
cd ./docs/manual
to change directory to where the manual pages are stored - run
mkdocs serve
to start the local web server with MkDocs and view the documentation in the web browser