Skip to content
This repository was archived by the owner on Jun 23, 2019. It is now read-only.

Commit

Permalink
feat: Build for web release
Browse files Browse the repository at this point in the history
  • Loading branch information
pksunkara committed Nov 2, 2017
1 parent 4fc7b52 commit 50838e2
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Generated by Peasant
{
"presets": ["env"],
"plugins": ["transform-runtime", "array-includes"]
"plugins": ["array-includes"]
}
17 changes: 10 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,30 @@
"version": "0.8.0",
"description": "Minim Parse Result Namespace",
"main": "./lib/parse-result.js",
"browser": "./lib/minim-parse-result.js",
"src": "./src/parse-result.js",
"repository": {
"type": "git",
"url": "https://github.com/refractproject/minim-parse-result.git"
},
"scripts": {
"lint": "peasant lint",
"test": "peasant test",
"ci": "peasant -s lint test build",
"prepublish": "npm run ci",
"build": "peasant -s build",
"web": "peasant -w build",
"ci": "peasant -s lint test",
"prepublish": "npm run ci && npm run build && npm run web",
"cover": "peasant cover",
"peasant": "peasant",
"lint": "peasant lint"
"peasant": "peasant"
},
"dependencies": {
"babel-runtime": "^6.23.0",
"minim-api-description": "^0.6.0"
"minim-api-description": "^0.7.0"
},
"devDependencies": {
"babel-plugin-array-includes": "^2.0.3",
"chai": "^3.2.0",
"minim": "^0.19.0",
"peasant": "^1.1.0"
"peasant": "^1.2.0"
},
"engines": {
"node": ">=4"
Expand Down
12 changes: 5 additions & 7 deletions src/parse-result.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import apiDescription from 'minim-api-description';

export function namespace(options) {
const minim = options.base;
const Element = minim.Element;
const { Element } = minim;
const StringElement = minim.getElementClass('string');
const ArrayElement = minim.getElementClass('array');

Expand All @@ -30,15 +30,13 @@ export function namespace(options) {
}

get warnings() {
return this.children.filter(
item => item.element === 'annotation' &&
item.classes.contains('warning'));
return this.children
.filter(item => item.element === 'annotation' && item.classes.contains('warning'));
}

get errors() {
return this.children.filter(
item => item.element === 'annotation' &&
item.classes.contains('error'));
return this.children
.filter(item => item.element === 'annotation' && item.classes.contains('error'));
}
}

Expand Down
2 changes: 1 addition & 1 deletion test/parse-result.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ describe('Parse result namespace', () => {
});

it('should contain an API', () => {
const api = parseResult.api;
const { api } = parseResult;
expect(api).to.be.an.instanceof(Category);
expect(api).to.have.class('api');
});
Expand Down

0 comments on commit 50838e2

Please sign in to comment.