This is an internal tool program (p3x) to manage a recursive async and serial command for NPM packages.


sudo npm install -g p3x-tools --unsafe-perm=true --allow-root


All folders exclude node_modules and bower_components except it is included.

p3x docker clean # delete images the have exited
p3x docker clear # delete all images in docker
p3x docker free # delete exited containers
p3x pkg yarn install | <command> # installs recursive every project that has a package.json
p3x build yarn install  | <command>  # install recursive every package that has a corifeus-builder
p3x npm unpublish # unpublish every package from NPM except the last Minor version (Major.Minor.Build-Commit)
p3x link # links every recursive given package together
p3x git <command> # you can execute a command on every git dir, recursive
p3x rm <folder> # remove recursive the given folder
p3x ncu -a # updates recursive all packages
p3x git pull # recursive pull every folder
p3x git push # recursive push every folder
p3x git renew|truncate # remote all commits, from #1231 commit to #1
p3x git init repo-name # .git is not required, is auto added, post-update is generated so it is my own, specific for the patrikx3.com server git repo (it adds in the webhook), the names are only lower cased forcefully a-z, digit and dash.

and more ...

If you want the commands is serials, add the -s or --serial flag, otherwise all async.

etc ...

Dependencies Fix


Default excludes from GitHub:


Github fork upstream

1 . Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2 . Add remote from original repository in your forked repository:

cd into/cloned/fork-repo  
git remote add upstream https://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git  
git fetch upstream  

3 . Updating your fork from original repo to keep up with their changes:

git pull upstream master
git merge upstream/master
git push

# or
git checkout dev
git pull upstream dev
git merge upstream/dev
git push

Warning / deprecate

npm deprecate <pkg>[@<version>] <message>
// or better
npm deprecate my-thing@"< 0.2.3" "critical bug fixed in v0.2.3"

Really make a bare repo to smaller


git gc --prune=now --aggressive

Show available versions on NPM

# for example
npm show p3x-angular-compile versions --json

Verdaccio NPM fix


docker run --rm -it node:9.2.0-alpine sh
/ # npm login --registry https://npm.company.com
Username: admin
Email: (this IS public) admin@company.com
Logged in as admin on https://npm.company.com/.
/ # cat ~/.npmrc
/ #

Another solution is like this:

# project .npmrc
registry = "https://registry.acmeco.com"
ca = null
always-auth = true

Swap for Docker



sudo nano /etc/default/grub


GRUB_CMDLINE_LINUX="cgroup_enable=memory swapaccount=1" 


sudo update-grub
p3x Split