How do you upload static web resources, or do you do it manually? Have you considered the feelings of front-end girls and operation brothers
A long time ago, a front-end girl finished writing code to go online, threw a compressed package over. After I sent the HTML files to the server and configured NGINX, I threw the rest of the static files into the CDN. Not long after, my sister came to me and said that the product manager had just changed a style and you should update it. I said, yes, no problem.. After about half an hour, my sister came to me again, the product said that the button is a little bit big, and let it change the style, you update it again. I frowned slightly and said yes, no problem. Then there was a big night, the product and his mother to demand, although I love girls to find me, but often like this, I can not happily and their sister to play ah. Thereupon, I move a hand….
Yes, this is a plugin for Grunt. When you build with the Grunt build command, then execute the Grunt cdn-upyun. It will quickly throw all the files in your generated directory to the CDN. Then I will combine with Webhook, when the master branch code is submitted, I will automatically execute the grunt build and grunt CDN-upyun command. Is that cool? Later my colleague Chengguan Ge wrote a version of NPM script in the same way, called NPM -script-cdn, which does not rely on Grunt. It is easy to run NPM run cdn-upyun.
Although I write based on the Upyun plug-in, but for example, QiNiu provides a very perfect NodeJS version of the SDK, according to their own needs to slightly expand the next can be.
I have put the code on GitHub. You can go to the public account chat interface and reply to CDN-upyun. I will give you both addresses.
Scan the QR code and follow me. Most of the content will be back-end technology, front-end engineering, DevOps, and occasionally some big data stuff and some fun stuff to recommend. I hope you will like it
Everything comes from love.