Create a Typescript Library | SDK | Node JS

Поделиться
HTML-код
  • Опубликовано: 24 авг 2024
  • In this video, we see how to build an SDK and publish to NPM registry.
    Github Repository: github.com/imd...
    Typescript Mixin: blog.logrocket...
    UPDATE:
    Published an article on Building SDK using Typescript with different folders for the resources and without using mixin which will avoid all methods on the root object,
    tech.durgadas....
    Notice:
    NodeJS and the Typescript logo are trademarks or registered trademarks of Nodejs and Typescript community. This video is not accredited, certified, affiliated with, nor endorsed by community.
    #microbundle #node #sdk #typescript #npmregister #publish #library #typescriptlibrary

Комментарии • 47

  • @ianmoon
    @ianmoon Год назад +3

    Honestly this is one extremely useful and helpful resource i have found out here thank you so much

  • @chennasreenu4723
    @chennasreenu4723 Год назад +1

    Power of TypeScript 😁😁😁, absolute madness. Bro, how are you getting such strong typescript suggestions? Are you using any extensions. I have been using Typescript, but I never get suggestion expect for predefined types.
    My manager asked to develop SDK. I thought it means a Javascript Library. Literally wasted my time.
    Now I understood what exactly is an SDK. Thanks a lot.

    • @durgadaskamath
      @durgadaskamath  Год назад +1

      Thanks for your kind words. I use Typescript Extension Pack within vscode which installs several extensions to help with typescript development.

  • @swaminathbera6407
    @swaminathbera6407 Год назад +4

    Thanks!, What code completion plugin are you using?
    Seems very useful.
    Feedback : No need of background music, Video is already amazing & informative

    • @durgadaskamath
      @durgadaskamath  Год назад

      Name: TypeScript Extension Pack
      Publisher: Loiane Groner
      VS Marketplace Link: marketplace.visualstudio.com/items?itemName=loiane.ts-extension-pack

  • @michaeltrembovler8301
    @michaeltrembovler8301 5 месяцев назад

    Excellent sdk-demo & test. Thank you a lot.

  • @martind2731
    @martind2731 Год назад +1

    Very clean tutorial bro🎉

  • @the-dark-matter
    @the-dark-matter Год назад +1

    This is extremely helpful!! THANK YOU!

  • @valkeallar7599
    @valkeallar7599 Год назад +1

    Great job sir! 🙏

  • @Deplyn
    @Deplyn Год назад

    Great tutorial! Thanks 🙌

  • @chetanbawankule8843
    @chetanbawankule8843 2 года назад +1

    great video.
    can you also make a video on how to also add components in sdk like strip and all other have

  • @user-sd1qn6lh3n
    @user-sd1qn6lh3n 6 месяцев назад

    Hello, very nice thank you so much, in my project the index.d.ts is not create, is it necessary to create manually?

  • @sony4481
    @sony4481 Год назад +1

    Amazing tutorial, thank you!!!
    Do I need to have an account with NPM registery to publish my SDK?

    • @durgadaskamath
      @durgadaskamath  Год назад +1

      In order to publish to npm , yes - you need an account.
      But lets say you want to use a library locally without publishing , you can use npm link command.

    • @sony4481
      @sony4481 Год назад +2

      @@durgadaskamath amazing thank you 🙌

    • @sony4481
      @sony4481 Год назад

      Hi
      I am getting a bad request from the POST request only see below. How do fix this please? Thanks
      function t(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var e=/*#__PURE__*/t(require("isomorphic-unfetch"));function o(){return o=Object.assign?Object.assign.bind():function(t){for(var e=1;e

  • @ricardoolartepuell2011
    @ricardoolartepuell2011 Год назад +1

    How to export all the funcionality if we create another folder, with other functions in it?

    • @durgadaskamath
      @durgadaskamath  Год назад +1

      Just import it here and add it to the array
      github.com/imdurgadas/sdk-typescript/blob/main/sdk-demo/src/index.ts#L8
      applyMixins(Typicode, [Posts, ]);

    • @durgadaskamath
      @durgadaskamath  Год назад

      Also, if you don't want every method on the root object, you can follow the article I have published here:
      durgadas.in/building-an-sdk-with-typescript

  • @gabrielpasquantonio1854
    @gabrielpasquantonio1854 7 месяцев назад

    this is gold

    • @durgadaskamath
      @durgadaskamath  7 месяцев назад

      Glad, that was helpful. Thank you !

  • @sanadamesh7723
    @sanadamesh7723 Год назад

    Very concise tutorial sir.
    Did i miss something? Where did you get the posts from? were they in a db or a json file? Can our SDK save data to a db or talk to external APIs for external data?

    • @durgadaskamath
      @durgadaskamath  Год назад +1

      Thanks, in this video - i am using an external public api which returns necessary post data.
      Offcourse, you can save it in db and return etc. It's all at your flexibility. SDK is basically just making your external behaviour accessible to users in an easy to use way.

  • @julesbessan2293
    @julesbessan2293 Год назад

    I want to make unity test for the npm package

  • @hochun836
    @hochun836 10 месяцев назад

    Hello !!!
    After you key 'npm init -y', the console displays the package.json content.
    How to implement this ?

    • @durgadaskamath
      @durgadaskamath  10 месяцев назад

      npm init -y : this command initializes your code location as npm project and that creates the package.json skeleton .

  • @edu.paixao
    @edu.paixao Год назад

    Thank you!🎉

  • @IamKonstantin
    @IamKonstantin 2 года назад +1

    that is great! thank you. subscribed :-)

    • @durgadaskamath
      @durgadaskamath  2 года назад

      Thank you !

    • @IamKonstantin
      @IamKonstantin Год назад

      @@durgadaskamath are there any books/courses you can recommend on sdk development?

  • @chetanbawankule2035
    @chetanbawankule2035 2 года назад

    can you share some refrences from where I can learn more about how to build sdk's
    my goal is to make a sdk /pacakge which want to use in react native.

    • @durgadaskamath
      @durgadaskamath  2 года назад +2

      Best reference would be to look into popular packages github code. Pick few of your favourity packages as reference and look into their source code to see how various things are packaged. Github projects are the best references to learn and build on the skill.
      e.g github.com/stripe/react-stripe-js

    • @chetanbawankule2035
      @chetanbawankule2035 2 года назад +1

      @@durgadaskamath Thanks man

    • @durgadaskamath
      @durgadaskamath  Год назад

      @@chetanbawankule2035 Also published an article on how we can have various folders for different resources: durgadas.in/building-an-sdk-with-typescript

  • @SidsAnalysis
    @SidsAnalysis Год назад

    is it directly not possible by typescript for compatibility in all with cjs, ecs

    • @durgadaskamath
      @durgadaskamath  Год назад

      Things have evolved over the years and there are many ways now to get things done. You just need to see what suits your case .

    • @SidsAnalysis
      @SidsAnalysis Год назад

      @@durgadaskamath I'm creating telegram bot api in js/ts that working correctly but shows red line when import in ts

    • @durgadaskamath
      @durgadaskamath  Год назад

      @@SidsAnalysis When it shows red line, what is the error message ?

    • @SidsAnalysis
      @SidsAnalysis Год назад

      ​@@durgadaskamath in yt there's no much videos or no videos
      Which explain configuration file of ts and package.json file in advanced for ts configuration and publish pkg

  • @durgadaskamath
    @durgadaskamath  Год назад +1

    Published an article on Building SDK using Typescript with different folders for the resources and without using mixin which will avoid all methods on the root object,
    tech.durgadas.in/building-an-sdk-with-typescript-74b3713ad32a