ask-cli exclude files during deploy to lambda
Add the ability to exclude files during lambda deploy.
$ deploy --target lambda --exclude */.test.js
Why not support an existing ignore file such as .npmignore?
Ron Wang commented
For now you can try to use the "hook" feature that CLI newly brings in firstname.lastname@example.org to realize your goal. If you look at the python pre-deploy script example https://developer.amazon.com/docs/smapi/ask-cli-intro.html#hooks, you will find that we modify the sourceDir to a lambda_upload folder for python skills. And you can totally do this using some task manager tools like gulp (if you are nodejs developer) to decide what you want to deploy. This pre-deploy hook will be triggered before each deploy.
Justin Washington commented
One way to do this right now is to make a build script that will process and copy the files you want to upload into a build folder. In .ask/config, you can set the sourceDir to your build folder and ask-cli will only upload the folder contents.
Mark Tucker commented
Or through an .askdeployignore file