REMOVE dev setup on package && Linting

This commit is contained in:
Norbert de Langen 2017-11-14 00:18:01 +01:00
parent e66e375245
commit 3af0b87e48
No known key found for this signature in database
GPG Key ID: 976651DA156C2825
5 changed files with 11 additions and 44 deletions

View File

@ -1,10 +0,0 @@
{
"presets": [
["env", {
"targets": {
"browsers": ["last 3 versions", "IE >= 11"]
}
}],
"react"
]
}

View File

@ -1,6 +1,6 @@
{
"name": "@storybook/addon-jest",
"version": "3.2.14",
"version": "3.2.15",
"description": "React storybook addon that show component jest report",
"keywords": [
"addon",
@ -15,33 +15,18 @@
"bugs": "https://github.com/storybooks/storybook",
"license": "MIT",
"author": "Renaud Tertrais <renaud.tertrais@gmail.com> (https://github.com/renaudtertrais)",
"files": [
"dist",
"styles.js",
"register.js"
],
"main": "dist/index.js",
"repository": {
"type": "git",
"url": "git+https://github.com/storybooks/storybook"
},
"scripts": {
"prebuild": "npm run clear",
"build": "cross-env NODE_ENV=production babel -d ./dist ./src",
"prebuild:storybook": "npm run clean:storybook",
"build:storybook": "build-storybook -c example/.storybook -o build/",
"clean:storybook": "rm -rf build",
"clear": "rm -rf ./dist",
"predeploy": "npm run build:storybook",
"deploy": "gh-pages -d build",
"prepublish": "npm run build",
"storybook": "cross-env NODE_ENV=development start-storybook -p 3001 -c example/.storybook",
"test:example": "jest example --json --outputFile=example/.jest-test-results.json"
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "^3.2.15"
},
"dependencies": {},
"devDependencies": {
"@storybook/addon-options": "^3.2.14",
"@storybook/react": "^3.2.14",
"babel-cli": "^6.26.0",
"babel-core": "^6.26.0",
"babel-preset-env": "^1.6.1",
@ -56,16 +41,14 @@
"eslint-plugin-import": "^2.8.0",
"eslint-plugin-jsx-a11y": "^6.0.2",
"eslint-plugin-react": "^7.4.0",
"gh-pages": "^1.0.0",
"jest": "^21.2.1",
"react": "^16.1.0",
"react-dom": "^16.1.0",
"style-loader": "^0.19.0"
},
"peerDependencies": {
"@storybook/addons": "^3.2.14",
"prop-types": "^15.6.0",
"react": "^16.0.0",
"react-dom": "^16.0.0"
"react": "*",
"react-dom": "*"
}
}

View File

@ -3,4 +3,4 @@ export default {
error: 'CRIMSON',
warning: 'DARKORANGE',
grey: 'LIGHTSLATEGRAY',
}
};

View File

@ -69,9 +69,7 @@ const TestsPanel = ({ tests }) => {
}}
>
{successNumber > 0 && (
<div style={{ color: colors.success }}>
{successNumber} passed
</div>
<div style={{ color: colors.success }}>{successNumber} passed</div>
)}
{failedNumber > 0 && (
<div style={{ marginLeft: 10, color: colors.error }}>{failedNumber} failed</div>
@ -136,7 +134,7 @@ const TestsPanel = ({ tests }) => {
.replace(/\[22?m?/g, '')
.replace(/\[31m/g, `<strong style="color: ${colors.error}">`)
.replace(/\[32m/g, `<strong style="color: ${colors.success}">`)
.replace(/\[39m/g, `</strong>`),
.replace(/\[39m/g, '</strong>'),
}}
/>
))}

View File

@ -1,5 +1,3 @@
import React from 'react';
import PropTypes from 'prop-types';
import addons from '@storybook/addons';
const basename = path => path.split('/').slice(-1)[0];
@ -18,7 +16,6 @@ const findTestResults = (testFiles, jestTestResults, jestTestFilesExt) =>
});
const withTests = (results, options) => (...testFiles) => {
const emitAddTests = ({ kind, story }) => {
addons.getChannel().emit('storybook/tests/add_tests', {
kind,
@ -31,7 +28,6 @@ const withTests = (results, options) => (...testFiles) => {
emitAddTests({ kind, story });
return storyFn();
};
}
};
export default withTests;