Tutorial for creating custom typescript libraries

rawcoder used Ask the Experts™
I am a relative newbie to node.js and typescript and am looking for tutorials and examples for building custom libraries for typescript. I am currently working on a project(switched to webstorm GUI) that requires I build several microservices and several of the microservices will need to share certain code, i.e., base repository functionality, etc. My though would be to move the code they have in common to a series of separate libraries(projects) and make them into typings and have the projects that need them to install them. Following the example I found here, and using grunt: What is the story for creating and consuming TypeScript libraries?, I was able to generate the .js file and the .d.ts files in a dist folder on the project. There are a few areas that I am confused about:

1) The example makes reference to a "main": "./dist/my.service.js" section in the jsconfig file, how necessary is this file and what should go into it?

2) If all of the files are transpiled and added to the dist folder, will the dependent code still be able to access it or do I have to transpile all of the files to root?

3) After I have have all of the file successfully transpiled and moved to the proper location, how do I install them to the dependent project if they are local and not up on the npm or Definitely Typed, etc.?
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

I'm not very familiar either. This course has a subsection about TypeScript.
Molnár IstvánHelpDesk / Programmer

Tutorials that can be helpful:

1. Pluralsight.com Video Tutorials: (free 1 month)
you can register for free to https://my.visualstudio.com and get 1 month free pluralsight subscription

typescript tutoials:

nodejs tutorials:

Pluralsight.com has a mobile application too: https://play.google.com/store/apps/details?id=com.pluralsight

2. Lynda.com Video Tutorials: (free 1 month)

typescript tutoials:

nodejs tutorials:

Lynda.com has a mobile application too: https://play.google.com/store/apps/details?id=com.lynda.android.root

Hint (for using it free and for access the entire library on the site):

3. You can also check, the Solo Learn mobile application:

(I tested/used all above and there are awesome for learning - just my opinion :))

Hope you can find what you are searching on these site.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial