Created
August 15, 2020 02:25
-
-
Save johnpolacek/066a853bf2a60b621e075a8fc34171d3 to your computer and use it in GitHub Desktop.
NPM prettier format and format-watch script
This file contains hidden or 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": { | |
"format": "prettier --write \"**/*.{js,jsx,json,md}\"", | |
"format-watch": "npm run format && onchange \"**/*.{js,jsx,json,md}\" -- prettier --write {{changed}}", | |
}, | |
"devDependencies": { | |
"onchange": "^7.0.2", | |
"prettier": "^2.0.5" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment