Tags can be used to provide an alias instead of version numbers. For example, a project might choose to have multiple streams of development and use a different tag for each stream, e.
You may have noticed before, in package.json files, the dependency versions include a prefix that tell npm how to look for updates.
NPM Lifecycle scripts The “scripts” property of your package.json file supports a number of built-in scripts and their preset life cycle events as well as arbitrary scripts.
Publishing an NPM package Things to remember In package.json, make sure you define the following fields before publishing main
A lot of the time, you want to define union types in typescript, and you would set it up like this by default for a small collection of enumerated values-as-types:
Many of you might be in a similar position to where I was, thinking lerna still served some sort of useful purpose in the node ecosystem, but no, it doesnt apparently.
These 2 are commonly used to mean pretty different things in node. process.cwd() is a function that is evaluated to the working directory of the process, by default this is the directory where the process was called from (where “node index.
A good tip to keep in mind when programming is minimizing your use of else statements. When possible, exit the function context earlier given a value that establishes the given return, rather than reflecting that with an else statement to check for something else.