I kept looking for a way to name the zip file with the current date using the plugin "grunt-contrib-compress". Is there any way to do this? I installed it correctly and installed the following:
compress: { build: { options: { archive: './zipped/foo.zip', mode: 'zip' }, files: [ { src: 'build/**'} ] } }
I would like to have a zipped file named as the current date, instead of the custom name "foo":
2014-09-25.zip
You can try using grunt.template.today() ...
grunt.template.today()
compress: { build: { options: { archive: './zipped/' + grunt.template.today('yyyy-mm-dd') + '.zip', mode: 'zip' }, files: [ { src: 'build/**'} ] } }
Source: https://habr.com/ru/post/1203372/More articles:Bootstrap: remove form field field - twitter-bootstrapHow to set request header in behavior tests? - headerUsing Selenium for AngularJS Web Applications - angularjsDjango 1.7 Migration error for foreign key with default value - djangoHow to write this function idiomatically? - listHijri (Islamic) calendar in fast التاريخ الهجري - iosHow to make a slide animation for the function $ state.go in an ionic structure? - javascriptHow to make round jbuttons in Java - javaDelegation event and window against window. Document - javascriptcallback when ui-view animation is running - angularjsAll Articles