File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change
1
+ 'use strict'
2
+
3
+ const { devices } = require ( '..' )
4
+ const { chain } = require ( 'lodash' )
5
+
6
+ console . log ( `| name | width | height | scale | mobile? | touch? | landscape? |` )
7
+ console . log (
8
+ `|------|-------|--------|-------------------|----------|----------|-------------|`
9
+ )
10
+
11
+ const deviceStrings = chain ( devices )
12
+ . orderBy ( [ 'name' ] , [ 'asc' ] )
13
+ . map ( device => {
14
+ const { name, viewport } = device
15
+ const {
16
+ width,
17
+ height,
18
+ deviceScaleFactor,
19
+ isMobile,
20
+ hasTouch,
21
+ isLandscape
22
+ } = viewport
23
+
24
+ return `| \`${ name } \` | ${ width } | ${ height } | ${ deviceScaleFactor } | ${ isMobile } | ${ hasTouch } | ${ isLandscape } |`
25
+ } )
26
+ . value ( )
27
+
28
+ deviceStrings . forEach ( str => console . log ( str ) )
Original file line number Diff line number Diff line change 38
38
"husky" : " latest" ,
39
39
"is-travis" : " latest" ,
40
40
"lint-staged" : " latest" ,
41
+ "lodash" : " latest" ,
41
42
"mocha" : " latest" ,
42
43
"nyc" : " latest" ,
43
44
"prettier-standard" : " latest" ,
You can’t perform that action at this time.
0 commit comments