Scenario: in this post we will see how configure Node.js and Typescript into your machine to develop your first custom component (PCF).
Currently there is one main way to install TypeScript that works for all editors and environments by using Node Package Manager npm that runs through the command line. To install the TypeScript compiler package, you need the Node Package Manager.
- Go to https://nodejs.org
- Choose latest versions available to download
- Once downloaded, go through the steps to install Node.js
- Once installation is complete, you have Node.js and npm ready on your machine. Check that by running npm version command in your command prompt:
- Next open your command prompt and type npm install -g typescript to install Typescirpt:
TypeScript will install and the command line will prompt you that TypeScript has been successfully installed and will provide you with the installed version.
Once you have TypeScript compiler installed you can use the tsc command to access the compiler at any time. To see the list of the tsc commands and their usages, run the tsc command in your command line:
I also want to tell you the excellent PCF Gallery, a web portal maintained by Guido Preite, in which there are already many examples of custom components (PCF) developed by the main community members.
Hope it helps and happy 365Power’ing!