UNPKG

525 BJavaScriptView Raw
1const browserslist = require('browserslist')
2
3const PATHS = require('./paths')
4
5const TARGET = process.env.GNOLL_TARGET
6
7const web = ['last 2 versions', '>1%', 'ie 11', 'not dead']
8const node = ['node 8']
9
10const 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
18module.exports = getTargets