简体   繁体   English

AWS S3 同步如何排除 *.js 文件但包含 *.min.js?

[英]AWS S3 sync how to exclude *.js files but include *.min.js?

I have a javascript folder called js/custom which has both *.js files and the minified version of the file with an extension called *.min.js, I want to make sure I only upload the minified version of the js file, how can I achieve this?我有一个名为 js/custom 的 javascript 文件夹,其中包含 *.js 文件和扩展名为 *.min.js 的文件的缩小版本,我想确保只上传 js 文件的缩小版本,如何我能做到这一点吗?

aws s3 sync /var/www/html/js/custom/* s3://inksedge/js/custom/*
--exclude 'js/custom/*.js' 

above will exclude the minified version as well, how do i get the result i want?上面也将排除缩小版本,我如何得到我想要的结果?

Try using the --include argument to include the min files尝试使用 --include 参数包含最小文件

--include - 包括

aws s3 sync /var/www/html/js/custom/* s3://inksedge/js/custom/*
--exclude 'js/custom/*.js' --include 'js/custom/*.min.js'

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM