jpillora / grunt-aws

A Grunt interface into the Amazon Node.JS SDK
171 stars 44 forks source link

Upload HTML files last #55

Open ccorcos opened 8 years ago

ccorcos commented 8 years ago

It would be awesome if the html files were uploaded last. Otherwise, theres a short amount of time when you can refresh the page and the html file will load without the necesary assets being available.

jpillora commented 8 years ago

You should be able to just change your file matcher and include HTML files at the end On Fri, 20 Nov 2015 at 8:58 AM Chet Corcos notifications@github.com wrote:

It would be awesome if the html files were uploaded last. Otherwise, theres a short amount of time when you can refresh the page and the html file will load without the necesary assets being available.

— Reply to this email directly or view it on GitHub https://github.com/jpillora/grunt-aws/issues/55.

ccorcos commented 8 years ago
  grunt.config.merge
    s3:
      html:
        files: [
          { src: 'index.html', dest: dest, cwd:'dist' },
        ]
      versioned_assets:
        files: [
          { src: '{images,scripts,styles,fonts}/*',  dest: dest, cwd: 'dist' },
          { src: '{images,scripts,styles,fonts}/**/*',  dest: dest, cwd: 'dist' },
          { src: '*.{xml,txt,ico}',             dest: dest, cwd: 'dist' }
        ]

Can you have ordered objects?