1 | const browserslist = require('browserslist')
|
2 |
|
3 | const PATHS = require('./paths')
|
4 |
|
5 | const TARGET = process.env.GNOLL_TARGET
|
6 |
|
7 | const web = ['last 2 versions', '>1%', 'ie 11', 'not dead']
|
8 | const node = ['node 8']
|
9 |
|
10 | const getTargets = () => {
|
11 | // Default value is used only if the user has not redefined the value
|
12 | // by any of the methods
|
13 | browserslist.defaults =
|
14 | TARGET === 'web' ? web : TARGET === 'node' ? node : [...web, ...node]
|
15 | return browserslist(null, { path: PATHS.root, env: process.env })
|
16 | }
|
17 |
|
18 | module.exports = getTargets
|