My folder structure is such:
functions
-- dist
-- private
-- server
---- controllers
---- middleware
------- clientAuth.js
------- someOtherAuth.js
---- index.js
---- model.js
---- router.js
I want to transpile all the .js files in my server folder into .dist. At present in my package.json I have
"scripts": {
"prepare": "babel ./server/**/*.js --retain-lines -d ./dist"
},
This only transpiles the files in the subdirectories in server, but not the files in the root of server. What can I use to transpile and place into .dist all the files in the root and the subdirectories?