-
Notifications
You must be signed in to change notification settings - Fork 84
/
Copy pathrename.js
29 lines (25 loc) · 799 Bytes
/
rename.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
var fs = require('fs');
var gulp = require('gulp');
var rename = require('gulp-rename');
var awspublish = require('../');
var credentials = JSON.parse(fs.readFileSync('aws-credentials.json', 'utf8'));
var publisher = awspublish.create(credentials);
// gulp.src('examples/fixtures/*.js')
// .pipe(rename(function (path) {
// path.dirname += '/s3-examples';
// path.basename += '-s3';
// }))
// .pipe(publisher.publish())
// .pipe(awspublish.reporter());
// gulp.src('**/*.js', {cwd: 'examples'})
// .pipe(publisher.publish())
// .pipe(awspublish.reporter());
gulp
.src('public/assets/**', { cwd: 'examples' })
.pipe(
rename(function (path) {
path.dirname = 'public/assets/' + path.dirname;
})
)
.pipe(publisher.publish())
.pipe(awspublish.reporter());