5:14 There is a CLI for that "npx tsc --init" 15:30 Before publishing a new package, you should test it locally. Use the "npm pack" command to create a TGZ file and you can use it in the package.json file using the "npm install relative_path_to_package_file" command
I really appreciate this video as I’m gonna be making a discord game package and this helped me understand things I didn’t understand before keep up the great work
Everyting on point. Very good tutorial. Saved me a lot of time. Been fluffing around with webpack and it’s plug-ins especially the ts-loader the bloody things are so out of sync. Spent countless hours trying to find compatible versions between the two.
You can use "npm link" to install this package locally in another project and test it out there. I found this great tutorial you might find helpful: dev.to/one-beyond/different-approaches-to-testing-your-own-packages-locally-npm-link-4hoj
How instead of this: import {Button, someFunction} form "my-package" have these separated like: import {Button} from "my-package/components" import {someFunction} from "my-package" or "my-package/functions" Thanks
Yes, it would be good practice to do so because some developers might use CommonJS with your library while others might use ESM. Configuring for both ensures that your library will be supported by both environments.
if you are lost, chances are you are missing the prerequisite, developing npm library is advanced topic, you can learn javascript, typescript, module system, node, and get used with web development first (coz modern dev will give yoh insight to why npm library exist / can be helpful)
Awesome quality video.
✅ Perfect audio.
✅ Straight to the point.
✅ Showing best practices.
Keep it up.
5:14 There is a CLI for that "npx tsc --init"
15:30 Before publishing a new package, you should test it locally. Use the "npm pack" command to create a TGZ file and you can use it in the package.json file using the "npm install relative_path_to_package_file" command
You can use "npm link" to link the package globally, then in a new folder you use "npm link package-name" and it'll be linked to you node_modules
I really appreciate this video as I’m gonna be making a discord game package and this helped me understand things I didn’t understand before keep up the great work
Best video I've watched on how to create npm package!!
From all the tutorials this was the one that got me to where I wanted to be! Thank you so much!
Everyting on point. Very good tutorial.
Saved me a lot of time. Been fluffing around with webpack and it’s plug-ins especially the ts-loader the bloody things are so out of sync.
Spent countless hours trying to find compatible versions between the two.
Thank you so much dude today i published my first ever package, this video helped me a lot.
Thank you for the clear explanation
Wow! What a good video!!! Best one for this subject, hands down.
nice, simple and straight forward
absolutely amazing video with great explanation every detail
🙏
Life saver! Thank you for that
thanks for making this, it fixed my problem
amazing video: I was seaarching for a tsdx alternative and, thanks to your awesome job, I found it!
thanks for the video bro
Frist: (الحمد لله)
Second: Thank you ♥
That’s so cool! Thanks so much that’s awesome! 👌
thanks to you, for my first npm package
Excellent video! Thank you for that!
Thanks so much This was really helpful for my SAAS
Glad to have been helpful. Good luck on your SaaS! :)
thank you for your best tutorial
Great quality tutorials! 👌
Great video! ❤🔥
keep going!!!!!!!!!!!!!!!!!!!!
Thanks for the tutorial I have made a npm package called log-glow
Very Informative video.
I have a question, this package is for Node Js. But how can we create a Vanilla JavaScript library like moment.js?
Thankful
Thank you.
Excellent! Can we do classes in ts with the same steps or do we need any other configs? Pls advise
You can use the same config for classes
Could also share how to build isomorphic packages and subpath exports 😊
awesome video. How would you recommend testing the code before building and publishing?
You can use "npm link" to install this package locally in another project and test it out there. I found this great tutorial you might find helpful: dev.to/one-beyond/different-approaches-to-testing-your-own-packages-locally-npm-link-4hoj
Why do I have to install types in some package and some I don't have to, but they still have types?
How instead of this:
import {Button, someFunction} form "my-package"
have these separated like:
import {Button} from "my-package/components"
import {someFunction} from "my-package" or "my-package/functions"
Thanks
bro this is gold. subsicribed
question: do we need to configure for both cjs and esm if I just want to make typescript libraries meant for nodeJS only?
Yes, it would be good practice to do so because some developers might use CommonJS with your library while others might use ESM. Configuring for both ensures that your library will be supported by both environments.
Great video 💯❤❤❤🎉🎉🎉🎉🎉
good job
Podrias hacer un tutorial para embeds programados?):
as i am using next js, i dont have main. then how to do it?
how to build for diff env like and prod.
Why is it for CommonJS? It is outdated
Node js works on common js only
Did a bot write this?
True pre node16
Cool....
package npm adduser notworking?
don't add package, that is his folder name used in the tutorial, just type "npm add user"
How To Make Dashboard #Day 1
I’m so lost at the beginning
Don't worry things gets so complicated when you don't know to start from
Fairly easy tutorial considering you do minimal compared to if you were using webpack or rollup
if you are lost, chances are you are missing the prerequisite, developing npm library is advanced topic, you can learn javascript, typescript, module system, node, and get used with web development first (coz modern dev will give yoh insight to why npm library exist / can be helpful)
import {defineConfig} from 'tsup'
export default defineConfig({
format: ['cjs', 'esm'],
entry: ['./src/index.ts'],
dts: true,
shims: true,
skipNodeModulesBundle: true,
clean: true,
})
and
{
"compilerOptions": {
"target": "es2022",
"module": "commonjs",
"outDir": "dist",
"declaration": true,
"noEmit": true,
"isolatedModules": true,
"esModuleInterop": true,
"moduleResolution": "Node",
/* Type Checking */
"strict": true,
"noImplicitAny": true,
"strictNullChecks": true,
},
"include": ["src"],
"exclude": ["node_modules"]
}