Grunt JS copy to network location

前端 未结 2 822
北恋
北恋 2021-01-04 07:57

I want to use grunt-contrib-copy (or any other grunt copying plugin) to copy files to network location.

Trying below:

    copy: {
        test: {
            


        
相关标签:
2条回答
  • 2021-01-04 08:11

    to copy files from mac to windows shared directory prepend the destination with smb:

    copy: {
      test: {
        files: [
          { src: ['Scripts/*'], dest: ['smb://location/site/Scripts/'] }
        ]
      }
    }
    

    kr, Joachim

    0 讨论(0)
  • 2021-01-04 08:23

    Yes, it's quite simple to do, just define your path with forward slashes:

    copy: {
         test: {
             files: [
                 { src: ['Scripts/*'], dest: ['//location/site/Scripts/'] }
             ]
         }
    }
    

    This will work on windows as-well, grunt will take care of that. Try it out.

    0 讨论(0)
提交回复
热议问题