This repository was archived by the owner on Jun 23, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +17
-16
lines changed Expand file tree Collapse file tree 4 files changed +17
-16
lines changed Original file line number Diff line number Diff line change 1
1
// Generated by Peasant
2
2
{
3
3
"presets" : [" env" ],
4
- "plugins" : [" transform-runtime " , " array-includes" ]
4
+ "plugins" : [" array-includes" ]
5
5
}
Original file line number Diff line number Diff line change 3
3
"version" : " 0.8.0" ,
4
4
"description" : " Minim Parse Result Namespace" ,
5
5
"main" : " ./lib/parse-result.js" ,
6
+ "browser" : " ./lib/minim-parse-result.js" ,
7
+ "src" : " ./src/parse-result.js" ,
6
8
"repository" : {
7
9
"type" : " git" ,
8
10
"url" : " https://github.com/refractproject/minim-parse-result.git"
9
11
},
10
12
"scripts" : {
13
+ "lint" : " peasant lint" ,
11
14
"test" : " peasant test" ,
12
- "ci" : " peasant -s lint test build" ,
13
- "prepublish" : " npm run ci" ,
15
+ "build" : " peasant -s build" ,
16
+ "web" : " peasant -w build" ,
17
+ "ci" : " peasant -s lint test" ,
18
+ "prepublish" : " npm run ci && npm run build && npm run web" ,
14
19
"cover" : " peasant cover" ,
15
- "peasant" : " peasant" ,
16
- "lint" : " peasant lint"
20
+ "peasant" : " peasant"
17
21
},
18
22
"dependencies" : {
19
- "babel-runtime" : " ^6.23.0" ,
20
- "minim-api-description" : " ^0.6.0"
23
+ "minim-api-description" : " ^0.7.0"
21
24
},
22
25
"devDependencies" : {
23
26
"babel-plugin-array-includes" : " ^2.0.3" ,
24
27
"chai" : " ^3.2.0" ,
25
28
"minim" : " ^0.19.0" ,
26
- "peasant" : " ^1.1 .0"
29
+ "peasant" : " ^1.2 .0"
27
30
},
28
31
"engines" : {
29
32
"node" : " >=4"
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import apiDescription from 'minim-api-description';
11
11
12
12
export function namespace ( options ) {
13
13
const minim = options . base ;
14
- const Element = minim . Element ;
14
+ const { Element } = minim ;
15
15
const StringElement = minim . getElementClass ( 'string' ) ;
16
16
const ArrayElement = minim . getElementClass ( 'array' ) ;
17
17
@@ -30,15 +30,13 @@ export function namespace(options) {
30
30
}
31
31
32
32
get warnings ( ) {
33
- return this . children . filter (
34
- item => item . element === 'annotation' &&
35
- item . classes . contains ( 'warning' ) ) ;
33
+ return this . children
34
+ . filter ( item => item . element === 'annotation' && item . classes . contains ( 'warning' ) ) ;
36
35
}
37
36
38
37
get errors ( ) {
39
- return this . children . filter (
40
- item => item . element === 'annotation' &&
41
- item . classes . contains ( 'error' ) ) ;
38
+ return this . children
39
+ . filter ( item => item . element === 'annotation' && item . classes . contains ( 'error' ) ) ;
42
40
}
43
41
}
44
42
Original file line number Diff line number Diff line change @@ -109,7 +109,7 @@ describe('Parse result namespace', () => {
109
109
} ) ;
110
110
111
111
it ( 'should contain an API' , ( ) => {
112
- const api = parseResult . api ;
112
+ const { api } = parseResult ;
113
113
expect ( api ) . to . be . an . instanceof ( Category ) ;
114
114
expect ( api ) . to . have . class ( 'api' ) ;
115
115
} ) ;
You can’t perform that action at this time.
0 commit comments