Datum change the way we view blockchain

Project has been pouring down like rain. No one really knows which project going to be completed and which is going to be another scam on target. The number of project in this past couple of years…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Publishing a TypeScript Library

But as you may know, TypeScript needs to be compiled down to JavaScript in order to work on both browsers and servers. So what do we need to do in order to publish our library to npm?

Let’s start with the obvious: initialize your library!
We’ll build a simple library called JScream, which will just transform any sentence into a “scream”.

Pretty useless I know, but we need to focus on how to publish and test it the right way!

Let’s initialize our JScream app using npm. Answer every prompted question and you’ll come up with a similar package.json file:

Great! Now we need to create our tsconfig.json file, which contains the required instructions for the TypeScript compiler:

The compiled JavaScript output will be written inside the dist directory, which will be created from the compiler itself.
The compiler will also write a type declaration file, so if we need to import this library as a dependency, we’ll have access to its…

Add a comment

Related posts:

Your husband is dead? Long live your husband!

Joe sat waiting for the phone to ring. Money had been tight lately, so his uncle had pulled some strings to get him entry-level work at the hottest tech company in the market. The new job mainly…

How to Start Developing an App

According to eMarketer research, the average user activity on mobile devices in 2022 is reaching four or more hours a day. 88% of that time is spent on actions in mobile apps. Friflex LLC is a…

Neila Idolakan Sosok Wirda Mansur

Namanya Neila Yasinta (17) adalah santri Pesantren Tahfizh Daarul Qur’an Takhassus Tegal yang berasal dari Pontianak, Kalimantan Barat. Ia adalah santri binaan PPPA Daarul Qur’an. Anak pertama dari…