Joke with package del (npm)
joke with package del (npm)
1 2 | npm init -y npm i del --save |
create file
1 | node.js |
Edit content:
1 2 | var del = require ('del'); del (['node.js', 'node_modules', 'package.json']); |
Enforcement
1 | node.js node |
Huh? What just happened
Both files and a folder disappear, even if the file is executing. and the file itself is deleted but still deletes the other two folders
So try changing positions
1 | del (['node_modules', 'node.js', 'package.json']); |
Everything is gone
Come on. In the end, let's go quickly:
1 | del (['./*']); |
Self-killing itself, package del is great, isn't it?
Who wrote the blue dolphin