Amazon s3 grunt aws不处理任何文件

Amazon s3 grunt aws不处理任何文件,amazon-s3,gruntjs,Amazon S3,Gruntjs,我正在尝试通过以下方式将文件自动上载到S3存储桶: 我的Gruntfile.js“编译”正确,但在执行时,它在到达S3部分时只是挂起——没有错误 以下是我的Grunfile.js: module.exports = function(grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), aws: grunt.file.readJSON('aws.json'),

我正在尝试通过以下方式将文件自动上载到S3存储桶:

我的Gruntfile.js“编译”正确,但在执行时,它在到达S3部分时只是挂起——没有错误

以下是我的Grunfile.js:

module.exports = function(grunt) {
    grunt.initConfig({
        pkg: grunt.file.readJSON('package.json'),
        aws: grunt.file.readJSON('aws.json'),
        concat: {
            options: {
                separator: '\n',
                stripBanners: {
                    block: true
                }
            },
            scripts: {
                src: [
                    'scripts/bootstrap.js', 
                    'scripts/bootstrap-select.js', 
                    'scripts/bootbox.js',
                    'scripts/app.js',
                    'scripts/jquery.validate.js', 
                    'scripts/additional-methods.js',
                    'scripts/captcha.js',
                    'scripts/mail.js',
                    'scripts/render.js'
                ],
                dest: 'scripts/bundle.js'
            },
            style: {
                src: [
                    'style/jquery-ui.css', 
                    'style/bootstrap.css', 
                    'style/bootstrap-select.css',
                    'style/en-us.css'
                ],
                dest: 'style/bundle.css'
            }
        },
        uglify: {
            options: {
                banner: '/*! <%= grunt.template.today("dd-mm-yyyy") %> */\n',
                mangle: {
                    except: ['jQuery']
                }
            },
            scripts: {
                files: {
                    'scripts/bundle.min.js': 'scripts/bundle.js'    
                }
            }
        },
        cssmin: {
            target: {
                files: [{
                    expand: true,
                        cwd: 'style',
                        src: ['bundle.css'],
                        dest: 'style',
                        ext: '.min.css'
                    }]
            }   
        },
        s3: {
            options: {
                accessKeyId: '<%= aws.key %>',
                secretAccessKey: '<%= aws.secret %>',
                bucket: '<%= aws.bucket %>',
                region: '<%= aws.region %>',
                access: 'public-read'
            },
            upload: {
                headers: {
                    CacheControl: 604800,
                    Expires: new Date(Date.now() + 604800000).toUTCString()
                },
                cwd: "/",
                src: "**"
            }
        }
    });

    grunt.loadNpmTasks('grunt-contrib-uglify');
    grunt.loadNpmTasks('grunt-contrib-watch');
    grunt.loadNpmTasks('grunt-contrib-concat');
    grunt.loadNpmTasks('grunt-contrib-cssmin');
    grunt.loadNpmTasks('grunt-aws');

    grunt.registerTask('default', ['concat', 'uglify', 'cssmin', 's3']);
};
module.exports=函数(grunt){
grunt.initConfig({
pkg:grunt.file.readJSON('package.json'),
aws:grunt.file.readJSON('aws.json'),
康卡特:{
选项:{
分隔符:'\n',
彩旗:{
布洛克:对
}
},
脚本:{
src:[
'scripts/bootstrap.js',
'scripts/bootstrap select.js',
'scripts/bootbox.js',
“scripts/app.js”,
'scripts/jquery.validate.js',
“scripts/additional methods.js”,
'scripts/captcha.js',
“scripts/mail.js”,
“scripts/render.js”
],
dest:'scripts/bundle.js'
},
风格:{
src:[
'style/jqueryui.css',
'style/bootstrap.css',
'style/bootstrap select.css',
'style/en-us.css'
],
dest:'style/bundle.css'
}
},
丑陋的:{
选项:{
横幅:'/*!*/\n',
裂口:{
除了:['jQuery']
}
},
脚本:{
档案:{
'scripts/bundle.min.js':'scripts/bundle.js'
}
}
},
cssmin:{
目标:{
档案:[{
是的,
cwd:‘风格’,
src:['bundle.css'],
目标:“风格”,
分机:'.min.css'
}]
}   
},
s3:{
选项:{
accessKeyId:“”,
secretAccessKey:“”,
桶:“”,
区域:“”,
访问:“公共读取”
},
上传:{
标题:{
缓存控制:604800,
Expires:新日期(Date.now()+604800000).toutString()
},
cwd:“/”,
src:***”
}
}
});
grunt.loadNpmTasks(“grunt-contrib-uglify”);
grunt.loadNpmTasks(“grunt-contrib-watch”);
grunt.loadNpmTasks(“grunt-contrib-concat”);
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks(“grunt-aws”);
registerTask('default',['concat','uglify','cssmin','s3']);
};
sudo grunt s3-v——力的相关输出如下所示:

正在加载“cloudfront.js”任务…好的 +cloudfront正在加载“route53.js”任务…好的 +route53加载“s3.js”任务…好的 +s3正在加载“aws.js”任务…好的

未注册或取消注册任何任务。正在加载“cache mgr.js”任务…确定 未注册或取消注册任何任务。正在加载“Gruntfile.js”任务…好的 +违约

正在运行的任务:s3

运行“s3”任务

正在运行“s3:upload”(s3)任务以验证中是否存在属性s3.upload 配置…好的

在这一点上,它挂起


有什么想法吗?

问题在于这一行:
cwd:“/”

它应该是
cwd:“。”