When you use grunt, bower, or any other of the fancy tools for your frontend development workflow you are getting (temporary) folders like
.node_modules, .sass-cache, .idea, editorconfig, ....
When you want to get rid of that stuff you just have to modify the TYPO3 setting
['EXT']['excludeForPackaging'] to your needs.
1 $GLOBALS['TYPO3_CONF_VARS']['EXT']['excludeForPackaging'] = '(CVS|\\..*(?!htaccess)|.*~|.*\\.bak|\\.sass-cache|node_modules)';
The perl regular expression syntax is used here. You have plenty of possibilities to exclude specific directories and files.