Created
February 12, 2024 02:10
-
-
Save omega-takai/5c7590c440170907b19c6e0dcaf50231 to your computer and use it in GitHub Desktop.
npm scriptsでファイルやフォルダを削除するときに、もうrimrafやdel-cliみたいなnpmモジュールをインストールしなくても、こうやって書けば大丈夫っぽい。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"scripts": { | |
"clean": "node -e \"fs.promises.rm('script.js', {force: true})\"", | |
"clean": "node -e \"fs.promises.rm('../dist', {recursive: true, force: true})\"" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment