0

I have a web project with several html and js files. I use the minify plugin and get .min versions for each file. I then upload the .min files to the server, but then I have to rename them on the server, to remove the .min extension...

Is it possible to create a task (or whatever) to rename the minified files to its original name and upload the minified version to the server?

For example, my project is

index.html
script/page1.js
style/style.css

When I minify, I get on my local computer:

index.html
index.min.html
script/page1.js
script/page1.min.js
style/style.css
style/style.min.css*

I want to upload to the server the minified versions, but with the original names:

index.html (but the minified version)
script/page1.js (but the minified version)
style/style.css (but the minified version)*

Thanks

Pedro
  • 201
  • 3
  • 8
  • Do you mean you want to have two files in the same location (e.g. `/styles/main.css`) with different contents depending on the server? – Álvaro González Jul 06 '18 at 11:33
  • @ÁlvaroGonzález I've edited my question. Thank you. – Pedro Jul 06 '18 at 11:51
  • So yes, you want that. Well, you obviously need to write a script in your favourite tool (bash, Node, python...) and that's too broad for a question. But I wonder what's the point of such a strange process—I don't think nobody else is handling assets that way. – Álvaro González Jul 06 '18 at 14:33

0 Answers0