Passed
Push — master ( b6753e...e6aee2 )
by Leandro
01:32
created

gulpfile.js   A

Complexity

Total Complexity 2
Complexity/F 1

Size

Lines of Code 23
Function Count 2

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 18
mnd 0
bc 0
fnc 2
dl 0
loc 23
rs 10
bpm 0
cpm 1
noi 0
c 0
b 0
f 0

2 Functions

Rating   Name   Duplication   Size   Complexity  
A ➔ build 0 7 1
A ➔ copyFiles 0 8 1
1
const { series, src, dest } = require("gulp");
2
const ts = require("gulp-typescript");
3
const tsProject = ts.createProject("tsconfig.dist.json");
4
const destDir = "lib";
5
6
function build() {
7
  return tsProject
8
    .src()
9
    .pipe(tsProject())
10
    .js
11
    .pipe(dest(destDir));
12
}
13
14
function copyFiles() {
15
  return src("./src/emails/**/*.*")
16
    .pipe(dest(destDir + "/emails/"))
17
    .pipe(src("./package*.json"))
18
    .pipe(dest(destDir))
19
    .pipe(src("./.env.*"))
20
    .pipe(dest(destDir));
21
}
22
23
exports.default = series(build, copyFiles);
24