init project
npm init
tsserver recommended
npm install --save-dev @tsconfig/recommended
packages
ordinal to convert numbers to strings like "1st" and "2nd", and date-names to
get the English named for weekdays and months.
date-names to get the English named for weekdays and months. It exports a
single function, formatDate, which takes a Date object and a template string.
ini an INI file parser.
global "user" packages
This is useful when you need to install some node cli programs that aren't packaged on your distro.
setup
Create a folder to install packages:
mkdir .npm-packages
Set an environment variable:
NPM_PACKAGES="${HOME}/.npm-packages"
Open .npmrc and add this line:
prefix=${HOME}/.npm-packages
Update path and manpath:
PATH="$NPM_PACKAGES/bin:$PATH"
MANPATH="$NPM_PACKAGES/share/man:$(manpath)"
add
npm install -g packagename
update
npm update -g