-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpaths.js
More file actions
33 lines (29 loc) · 732 Bytes
/
paths.js
File metadata and controls
33 lines (29 loc) · 732 Bytes
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
30
31
32
33
import fs from 'fs'
import path from 'path'
const base = path.join(__dirname, '..')
const pkg = `${base}/package.json`
const src = `${base}/src`
const dist = `${base}/lib`
const modules = `${base}/node_modules`
let lint = [
`${base}/src/**/*.js`,
`${base}/webpack/**/*.js`
]
// Read ignore lint config from package.json
try {
let ignore = require(pkg).standard.ignore
ignore.map((item) => lint.push(`!${base}/${item}`))
} catch (e) {}
let internalModules = fs.readdirSync(modules)
.filter(folder => !!~folder.indexOf('fe-'))
.map(folder => `${modules}/${folder}`)
export default {
base,
pkg,
src,
dist,
lint,
webpack: `${base}/webpack`,
node_modules: modules,
src_path: internalModules.concat(src)
}