English | MP4 | AVC 1280×720 | AAC 44KHz 2ch | 72 lectures (5h 41m) | 2.34 GB
Create and publish your own tree-shakable NPM packages and learn this must-have skill every web developer should acquire
NPM packages are the most popular and powerful way today for making your code reusable and share it between various projects. But as most of us are starting to code for the web by developing web applications, when the time comes and we need to create and publish our own first NPM package, we find ourselfs guessing what are the best practices we should follow
That’s what happened to me a few years ago when I was required to create my first NPM package. I tried to search for some detailed tutorial or an in-depth course to guide me, but pretty soon I realized such source doesn’t really exist. So I started gathering the knowledge through endless blog posts, short tutorials, friends, colleagues and mainly a lot of exploring and experimenting I did on my own.
Years later, I’m really happy to publish this course and share the knowledge I accumulated during all this time. One of the main purposes of doing so, is to make your journey with NPM packages much easier and pleasant. So I hope you will enjoy this ride of learning and start implementing your own amazing NPM packages
This course will start from the basic stuff regarding NPM packages and then continue to the most advanced topics it involves
You will learn the basic structure of an NPM package, all the configurations involved in creating it, and of course the various properties that the package json file should include. We will experiment with our newly created package, ship it with different module systems, develop it with full typescript support and see the differences between consuming it through frontend and backend applications. We will then learn how we can automate the process of versioning and publishing the package, with some of the most popular and exciting CI tools. Pre-releases will also be on the menu, and we will learn some techniques that will enable us to publish pre-release versions while maintaining our current stable version. We will test various ways of building our packages, and of course, we will take a deep dive into the interesting topic of tree shaking, where we will see live examples and reveal all the behind the scenes of it.
After this course you will feel confident regarding your ability to create NPM packages with best practices, and you will have the tools to debug the behavior of your package and adjust its configurations according to your needs
I hope you will have a great experience during our time together, and wish you will soon start to implement your own creative ideas for your popular, brand-new, NPM package
What you’ll learn
- Learn all basic & advanced configurations every NPM package creator must know
- Implement tree shakable packages (dive deep and truely understand this concept)
- Publish your NPM package with ease using automated CI tools
- Ship your package with vaious module systems
- Handle parallel development of pre-release versions of your package while maintainning stable versions
- Create your package with Typescript support
Table of Contents
Introduction
1 Introduction
2 How to get help
Creating our first basic npm package
3 Section intro
4 Verifing Node version
5 Create git repo for the package
6 Generate source code
7 Package json name property
8 Module systems in packages
9 Setting tsconfig.json
10 Installing Rollup
11 Rollup configuration
12 Configurations explained
13 Package entry points
14 The files field
15 Creting our npm account
16 Publishing our package
17 Section wrap up
Experimenting with the package
18 Section intro
19 Installing a Vite app
20 Using the package inside the app
21 Exploring the app’s production bundle
22 How our package is consumed
23 Express App
24 Installing & running express app
25 Using the package inside express
26 Experimenting with the express app
27 Section wrap up
Versioning & Publishing
28 Section intro
29 Changesets action
30 Semantic versioning
31 Initializing changesets
32 Writing github workflow
33 Explain the workflow
34 Creating a Github token
35 Creating a NPM token
36 Publishing with changesets
37 Multiple tasks with changesets
38 Section wrap up
Pre releases
39 Section intro
40 Linking our package
41 Behind the scenes of npm link
42 Planning pre release
43 Enter pre release mode
44 Working in parallel
45 Publish our first pre release version
46 Consume the pre release version
47 Parallel work on regular release
48 Consume the regular package release
49 Promoting our pre release tag
50 Releasing the next major version
51 Trying the new major version
52 Section wrap up
Tree shaking
53 Section intro
54 Explaining tree shaking
55 Components package code
56 Creating git repo for the new package
57 Exploring the package’s code
58 Prepare for publishing
59 Generating github token
60 Generating npm token
61 Publishing the components package
62 using our new package
63 Is our package tree shakable
64 First condition for tree shakable package
65 NPM packages and side effects
66 How to leverage the side effects optimization
67 Package built with typescript
68 Publish our tree shakable package
69 Testing if the package is tree shakable
70 One more mystery to solve
71 Section wrap up
Closing notes
72 Congratulations
Resolve the captcha to access the links!