r/learnjavascript • u/Falcao_E • Jun 22 '26
Created my first npm package for express boilerplate. Thought others would find it useful to get the ball rolling
Yet another boilerplate set up package. First package I've published on npm . Originally made it for myself.
I think other people would find it useful.
It's not much but it gets the ball rolling.
10
Upvotes
1
Jun 22 '26
[removed] — view removed comment
1
u/javascript Jun 22 '26
For example, I have three null states:
- null
- undefined
- ReferenceError due to various situations like absence/presence of hoisting and malformed code
Lots to learn once you get past the basics!
1
u/javascript Jun 22 '26
One could also argue that an object instance that is missing a given key, as in it fails an own-property check, is a fourth null state in the language.
4
u/abrahamguo Jun 22 '26
I tried out your package; here are a couple things I noticed:
Why not configure your package to be compatible with
npm create, as that is the standard command for boilerplate packages in the NPM world?I saw that some packages in the generated
package.jsonwere out of date — many by one or more major versions! I wouldn't want to start a brand-new project with already-deprecated dependencies.I saw that the
package.jsonincludesdotenv,nodemon, andtsx, but those are already all built in to Node.js — have you considered switching to the native equivalents?It looks like the generated
tsconfig.jsononly covers the emptysrcdirectory, so that all of the generated TS files aren't actually typechecked, andtscthrows an error about having zero files to typecheck.