gruntjs - Rename a folder with Grunt or Node.JS -


is possible rename folder without whole process of making new directory, copy files new directory, remove old directory?

this process takes several minutes complete, forced use batch script rename folders, i'd prefer handled grunt. looking through node docs appears there no way rename folders similar way 'mv' or 'rename' commands work.

the use-case faster deployment workflow grunt on intranet site. i'd minimal down time, 2 minutes of downtime copy files not ideal.

  • i stage website on server in www/test.

  • i rename www/prod www/archived

  • then rename www/test www/prod making new site live.

using grunt-shell solved problem, have warn future developers platform shell commands meant for, in case windows.

shell: {         options: {             stderr: false         },         'archivetodelete': {             command: 'rename <%= yeoman.winserver %>\archived delete-this'         },         'livetoarchive': {             command: 'rename <%= yeoman.winserver %>\prod archived'         },         'deploytolive': {             command: 'rename <%= yeoman.winserver %>\test prod'         },     } 

Comments

Popular posts from this blog

python - TypeError: start must be a integer -

c# - DevExpress RepositoryItemComboBox BackColor property ignored -

django - Creating multiple model instances in DRF3 -