-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
21 lines (15 loc) · 960 Bytes
/
gulpfile.js
File metadata and controls
21 lines (15 loc) · 960 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
const gulp = require('gulp');
const clean = require('gulp-clean');
const clean_shared = () => gulp.src(['shared/', './mock/aws.dev.json'], {
allowEmpty: true
}).pipe(clean());
const copy_files = (pattern, dest) => gulp.src([pattern]).pipe(gulp.dest(dest));
const copy_aws_config = () => copy_files('../ki-shared-utility/mock/aws.dev.json', './mock');
const copy_run_js = () => copy_files('../ki-shared-utility/mock/run.js', './mock');
const copy_src_files = () => copy_files('../ki-shared-utility/src/*', 'shared');
const copy_babelrc = () => copy_files('../ki-shared-utility/.babelrc', './');
const copy_git_ignore = () => copy_files('../ki-shared-utility/.gitignore', './');
const copy_buildspec = () => copy_files('../ki-shared-utility/buildspec.yml', './');
const build = gulp.series(clean_shared, copy_aws_config, copy_run_js, copy_src_files, copy_babelrc, copy_git_ignore, copy_buildspec);
gulp.task('default', build);
gulp.task('build', build);