mirror of
https://github.com/storybookjs/storybook.git
synced 2025-03-21 05:02:39 +08:00
Merge branch 'master' into patch-1
This commit is contained in:
commit
2e364413ff
10
.travis.yml
10
.travis.yml
@ -17,15 +17,17 @@ script:
|
||||
- npm run lint
|
||||
- npm run test -- --coverage
|
||||
- npm run coverage
|
||||
- npm run danger
|
||||
git:
|
||||
depth: 1
|
||||
env:
|
||||
global:
|
||||
- CXX=g++-4.8
|
||||
- secure: cAde4wBX75KtTWcyOOLAG3Z9ODdqvmbkL7+8fVNj/+QkZZWE8pFa3deaTIHF9NyVO2h6/jutSkzmsz/nOyBYVPHhGsxBTmsyXoko48Wg+iNm7epoH5uts/kmAPiwpzaWGXwuiAvsOGZjYYFzM335jyaOAcZW3f0C5gIJ5XCCdWBQRaFFLq+ZLKsLSME6xTfV2OMVH24hxXvbF9wvO0aj6p/GaT0cS8Rpg4sQ9eeih2IM/uLiqWzp9UUM2m8SUiFfveqYJFkBtzqAus9pbwsoQjnAT5e3CKJUpPiruCAe5FOt57Hl+mH1N1xqP1ei8j2ZNF+E6zuDdAcMpArTIMM69L+D7wzJYDoF2PuF+jeet7ytAFxSgnZHSTsBJn5cZMPh2tuX7aWwgrpMknVe3bdoINwkyVCaIW+Ur6vc37l/Kuw25eiMBtRDyMhUf4V3FAFi3PV1XKn+34cR4kvpOHt6vk8v5CobBHfQdwU+6FMZMo3GFIkDBcLydLn3WLQ3jKa4OcLqWws6o85k+bHZkLhlADjbiX/PzG23D+sT7Inzj//Tef93SIL02yN+ooZdIUtDus3+qZzhcSrDeSb2octjLXRzPiGn5cFNI86HVcu7qF0+4zCPconhM4+mfAh5S19fmnRdTQctQQxbsObuT9jcMvgJdhIX89aA7Ry3pAx2b6Q=
|
||||
- CXX=g++-4.8
|
||||
- secure: cAde4wBX75KtTWcyOOLAG3Z9ODdqvmbkL7+8fVNj/+QkZZWE8pFa3deaTIHF9NyVO2h6/jutSkzmsz/nOyBYVPHhGsxBTmsyXoko48Wg+iNm7epoH5uts/kmA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fJTtNaO2uH+iUMNSNzAbJmgxtsi3NuX+G+2N02mtaUCzN/SOmKKoZsuPfKVcpHgVa41mgio6QJs7wy9/VWYYASNZddj2HnvLGLBLnJpv+uKKpdSB0Xe6k8dOl1MbaWJT4Xy0/NUD3gawLCvhfN9qL0+QnlJAXCbOoms6EoAyc6fY=
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- ubuntu-toolchain-r-test
|
||||
packages:
|
||||
- g++-4.8
|
||||
- g++-4.8
|
||||
|
26
dangerfile.js
Normal file
26
dangerfile.js
Normal file
@ -0,0 +1,26 @@
|
||||
import { fail, danger } from 'danger';
|
||||
import { flatten, intersection, isEmpty, includes } from 'lodash';
|
||||
|
||||
const pkg = require('./package.json'); // eslint-disable-line import/newline-after-import
|
||||
const prLogConfig = pkg['pr-log'];
|
||||
|
||||
const checkRequiredLabels = labels => {
|
||||
const requiredLabels = flatten([
|
||||
prLogConfig.skipLabels || [],
|
||||
Object.keys(prLogConfig.validLabels || {}),
|
||||
]);
|
||||
|
||||
if (includes(labels, 'do not merge')) {
|
||||
fail('PR is marked with "do not merge" label.');
|
||||
}
|
||||
|
||||
const foundLabels = intersection(requiredLabels, labels);
|
||||
if (isEmpty(foundLabels)) {
|
||||
fail(`PR is not labeled with one of: ${JSON.stringify(requiredLabels)}`);
|
||||
}
|
||||
};
|
||||
|
||||
if (prLogConfig) {
|
||||
const { labels } = danger.github.issue;
|
||||
checkRequiredLabels(labels.map(l => l.name));
|
||||
}
|
@ -93,3 +93,7 @@ It allows you to configure the display and copy the code with a single click.
|
||||
### [Intl](https://github.com/truffls/storybook-addon-intl)
|
||||
|
||||
With this addon you will have an additional panel at the bottom which provides you buttons to switch the locale and directly see the result in the preview.
|
||||
|
||||
### [Versions](https://github.com/buildit/storybook-addon-versions)
|
||||
|
||||
This addon lets you navigate different versions of static Storybook builds. As such you can see how a component has changed over time.
|
||||
|
@ -12,6 +12,7 @@
|
||||
"changelog": "pr-log --sloppy",
|
||||
"precommit": "lint-staged",
|
||||
"coverage": "codecov",
|
||||
"danger": "danger",
|
||||
"dev": "lerna exec --parallel -- babel src -d dist --ignore tests,__tests__,test.js,stories/,story.jsx --plugins \"transform-runtime\" --copy-files -w",
|
||||
"docs:build": "cd docs && npm run build",
|
||||
"docs:deploy:ci": "cd docs && npm run deploy:ci",
|
||||
@ -36,6 +37,7 @@
|
||||
"babel-preset-stage-0": "^6.24.1",
|
||||
"chalk": "^1.1.3",
|
||||
"codecov": "^2.2.0",
|
||||
"danger": "^0.21.0",
|
||||
"enzyme": "^2.8.2",
|
||||
"eslint": "^3.19.0",
|
||||
"eslint-config-airbnb": "^15.0.1",
|
||||
|
Loading…
x
Reference in New Issue
Block a user