First, we need to set up IDE. There are three files needs to be updated and placed in the place. Please make sure you put launch.json and tasks.json are under .vscode folder.
- launch.json: it is used to launch the application with predefined tasks such as Typescript build.
- tsconfig.json is to used to build the application using Puppeteer
- tasks.json is to define the Typescript build process
The content of these three files
The node_modules folder is created from the npm command provided by the NodeJS framework. The command to run is listed the following. The first line is to install TypeScript compiler which is not installed by default with VS Code. The second line is to install Puppeteer. The last line is to install the library for Typescript to work with Puppeteer.
The last file is the Puppeteer file: