@@ -13,12 +13,7 @@ const inquirer = require('inquirer');
13
13
const pkgUp = require ( 'pkg-up' ) ;
14
14
const fs = require ( 'fs' ) ;
15
15
16
- const defaultBrowsers = {
17
- development : [ 'chrome' , 'firefox' , 'edge' ] . map (
18
- browser => `last 2 ${ browser } versions`
19
- ) ,
20
- production : [ '>0.25%' , 'not op_mini all' , 'ie 11' ] ,
21
- } ;
16
+ const defaultBrowsers = [ '>0.25%' , 'not op_mini all' , 'ie 11' ] ;
22
17
23
18
function checkBrowsers ( dir , retry = true ) {
24
19
const current = browserslist . findConfig ( dir ) ;
@@ -66,16 +61,7 @@ function checkBrowsers(dir, retry = true) {
66
61
console . log ( ) ;
67
62
console . log ( chalk . green ( 'Set target browsers:' ) ) ;
68
63
console . log ( ) ;
69
- console . log (
70
- `\t${ chalk . bold ( 'Production' ) } : ${ chalk . cyan (
71
- defaultBrowsers . production . join ( ', ' )
72
- ) } `
73
- ) ;
74
- console . log (
75
- `\t${ chalk . bold ( 'Development' ) } : ${ chalk . cyan (
76
- defaultBrowsers . development . join ( ', ' )
77
- ) } `
78
- ) ;
64
+ console . log ( `\t${ chalk . cyan ( defaultBrowsers . join ( ', ' ) ) } ` ) ;
79
65
console . log ( ) ;
80
66
} )
81
67
// Swallow any error
@@ -88,20 +74,4 @@ function checkBrowsers(dir, retry = true) {
88
74
} ) ;
89
75
}
90
76
91
- function printBrowsers ( dir ) {
92
- return checkBrowsers ( dir ) . then ( browsers => {
93
- if ( browsers == null ) {
94
- console . log ( 'Built the bundle with default browser support.' ) ;
95
- return ;
96
- }
97
- browsers = browsers [ process . env . NODE_ENV ] || browsers ;
98
- if ( Array . isArray ( browsers ) ) {
99
- browsers = browsers . join ( ', ' ) ;
100
- }
101
- console . log (
102
- `Built the bundle with browser support for ${ chalk . cyan ( browsers ) } .`
103
- ) ;
104
- } ) ;
105
- }
106
-
107
- module . exports = { defaultBrowsers, checkBrowsers, printBrowsers } ;
77
+ module . exports = { defaultBrowsers, checkBrowsers } ;
0 commit comments