Passed
Pull Request — master (#5)
by Dmytro
01:25
created

tests/entry.js   A

Complexity

Total Complexity 1
Complexity/F 1

Size

Lines of Code 12
Function Count 1

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

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

1 Function

Rating   Name   Duplication   Size   Complexity  
A entry.js ➔ _load 0 3 1
1
import path from 'path';
2
3
const isBuild = process.env.BUILD && [ '1', 'true' ].includes(process.env.BUILD);
4
const entry = process.env.ENTRY && path.resolve(process.env.ENTRY)
5
|| isBuild && path.resolve(__dirname, '../lib')
6
|| path.resolve(__dirname, '../src');
7
8
export default require(entry);
9
10
export function _load(relPath) {
11
    return require(path.join(entry, relPath));
12
}
13