GithubHelp home page GithubHelp logo

Comments (2)

sindresorhus avatar sindresorhus commented on May 19, 2024

Both are supported by grunt. Read the grunt docs.

from grunt-ftp.

honi avatar honi commented on May 19, 2024

Hi,

Even though {'dest': 'src'} could be a supported format for specifying files, I believe this is not standard.

Grunt will expand the files object correctly, and el.dest (in your code) will be the final destination of the file. Why are you adding el.src[0] to that? finalRemotePath should be just el.dest.

Example configuration does not work correctly, it only uploads the first file in the src directory.

If src directory contains just one file named index.html, then using this configuration:

files: [{
    expand: true,
    src: 'src/*',
    dest: 'public_html'
}]

Uploads index.html to this remote location /public_html/src/index.html/src/index.html because:

el.dest == 'public_html/src/index.html'
el.src[0] == 'src/index.html'

Is there some specific reason you are building finalRemotePath that way?

My versions:

$ grunt --version
grunt-cli v0.1.6
grunt v0.4.2
$ node --version
v0.10.26

from grunt-ftp.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.