Search code examples
office-jsscriptlab

How to convert a script-lab example to Visual Studio 2019 Community project


Say I want to convert "Basic API call (TypeScript)" Word Add-in sample to a Visual Studio project. What are the steps for a newbie, in particular for people new to installing, setting up, and using technologies like jQuery, WebPack, Typescript.

In particular, I assume that

  • contents of the "Script" tab goes to, say "Home.ts",
  • contents of the "HTML" tab goes to "home.html",
  • and contents of the "CSS" tab goes to "home.css".

Then where does the contents of the "Libraries" tab go?


Solution

  • You should call the libraries with <script> tags in home.html. You may find that the autogenerated home.html already has some or all of them.