Merge branch 'master' into ndelangen/add-dirname

This commit is contained in:
Norbert de Langen 2018-01-25 09:04:12 +01:00 committed by GitHub
commit 237e9b7f57
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 44 additions and 72 deletions

View File

@ -84,6 +84,9 @@ module.exports = {
'^.+\\.jsx?$': 'babel-jest',
'.*\\.(vue)$': '<rootDir>/node_modules/jest-vue-preprocessor',
},
transformIgnorePatterns: [
'/node_modules/(?!(@storybook/.*\\.vue$))',
],
moduleFileExtensions: ['vue', 'js', 'jsx', 'json', 'node'],
};
```

View File

@ -76,7 +76,7 @@
"util-deprecate": "^1.0.2",
"uuid": "^3.2.1",
"vue-hot-reload-api": "^2.2.4",
"vue-style-loader": "^3.0.1",
"vue-style-loader": "^3.1.1",
"webpack": "^3.10.0",
"webpack-dev-middleware": "^1.12.2",
"webpack-hot-middleware": "^2.21.0"

View File

@ -31,12 +31,12 @@
"babel-preset-react": "^6.24.1",
"babel-preset-stage-0": "^6.24.1",
"bootstrap": "^3.3.7",
"gatsby": "^1.9.165",
"gatsby": "^1.9.166",
"gatsby-link": "^1.6.34",
"gatsby-plugin-sharp": "^1.6.25",
"gatsby-plugin-sharp": "^1.6.26",
"gatsby-remark-autolink-headers": "^1.4.11",
"gatsby-remark-copy-linked-files": "^1.5.25",
"gatsby-remark-images": "^1.5.39",
"gatsby-remark-images": "^1.5.40",
"gatsby-remark-smartypants": "^1.4.10",
"gatsby-source-filesystem": "^1.5.14",
"gatsby-transformer-remark": "^1.7.29",

View File

@ -1,6 +1,5 @@
import React from 'react';
import Link from 'gatsby-link';
import slackIcon from './images/slack-icon.png';
import githubIcon from './images/github-icon.png';
import './style.css';
@ -14,13 +13,6 @@ const Footer = () => (
.
</center>
<center>
<a
href="https://now-examples-slackin-nqnzoygycp.now.sh/"
target="_blank"
rel="noreferrer noopener"
>
<img src={slackIcon} alt="Storybook Slack" />
</a>
<a
href="https://github.com/storybooks/storybook"
target="_blank"

View File

@ -5,12 +5,12 @@ airbnb:
source: https://github.com/airbnb/react-dates
demo: http://airbnb.io/react-dates/
site: http://airbnb.com
slack:
logo: slack.svg
title: Slack Emoji Picker
description: Slack improves performance and maintainability with Storybook!
demo: https://slack.engineering/rebuilding-slacks-emoji-picker-in-react-bfbd8ce6fbfe
site: http://slack.com
# slack:
# logo: slack.svg
# title: Slack Emoji Picker
# description: Slack improves performance and maintainability with Storybook!
# demo: https://slack.engineering/rebuilding-slacks-emoji-picker-in-react-bfbd8ce6fbfe
# site: http://slack.com
lonelyplanet:
logo: lonelyplanet.svg
title: Lonely Planet

View File

@ -113,33 +113,3 @@ npm run storybook
Now you can change components and write stories whenever you need to.
You'll get those changes into Storybook in a snap with the help of webpack's HMR API.
## Tips
### Configure style rules
If you use `templateUrl` in your components, you need to configure webpack rules for .css/.scss files. Create a file named `webpack.config.js` under the config directory(by default `.storybook`):
```js
const genDefaultConfig = require('@storybook/angular/dist/server/config/defaults/webpack.config.js');
module.exports = (baseConfig, env) => {
const config = genDefaultConfig(baseConfig, env);
// Overwrite .css rule
const cssRule = config.module.rules.find(rule => rule.test && rule.test.toString() === '/\\.css$/');
if (cssRule) {
cssRule.exclude = /\.component\.css$/;
}
// Add .scss rule
config.module.rules.unshift({
test: /\.scss$/,
loaders: ['raw-loader', 'sass-loader'],
});
return config;
};
```
If you want more details, see [customize the webpack config](/configurations/custom-webpack-config/).

View File

@ -4325,9 +4325,9 @@ gatsby-1-config-css-modules@^1.0.8:
dependencies:
babel-runtime "^6.26.0"
gatsby-cli@^1.1.28:
version "1.1.28"
resolved "https://registry.yarnpkg.com/gatsby-cli/-/gatsby-cli-1.1.28.tgz#0d0a397566154a3ce3e4680d545c9cfdc33ad95b"
gatsby-cli@^1.1.29:
version "1.1.29"
resolved "https://registry.yarnpkg.com/gatsby-cli/-/gatsby-cli-1.1.29.tgz#590f766ca61591e69a7793660b767257b896d6fe"
dependencies:
babel-code-frame "^6.26.0"
babel-runtime "^6.26.0"
@ -4362,9 +4362,9 @@ gatsby-module-loader@^1.0.9:
babel-runtime "^6.26.0"
loader-utils "^0.2.16"
gatsby-plugin-sharp@^1.6.25:
version "1.6.25"
resolved "https://registry.yarnpkg.com/gatsby-plugin-sharp/-/gatsby-plugin-sharp-1.6.25.tgz#c6c67276ac4ed7ca9ac2b15dcdcd199f12e4208d"
gatsby-plugin-sharp@^1.6.26:
version "1.6.26"
resolved "https://registry.yarnpkg.com/gatsby-plugin-sharp/-/gatsby-plugin-sharp-1.6.26.tgz#55f0b3274ac0fd1d230c7b6a2e8b378d4a259667"
dependencies:
async "^2.1.2"
babel-runtime "^6.26.0"
@ -4409,13 +4409,13 @@ gatsby-remark-copy-linked-files@^1.5.25:
path-is-inside "^1.0.2"
unist-util-visit "^1.1.1"
gatsby-remark-images@^1.5.39:
version "1.5.39"
resolved "https://registry.yarnpkg.com/gatsby-remark-images/-/gatsby-remark-images-1.5.39.tgz#afd2f8493af625ea1dcc10977af03769aa4c5d97"
gatsby-remark-images@^1.5.40:
version "1.5.40"
resolved "https://registry.yarnpkg.com/gatsby-remark-images/-/gatsby-remark-images-1.5.40.tgz#aaea237bed6ca9f4e232163728c1db7215e530ba"
dependencies:
babel-runtime "^6.26.0"
cheerio "^1.0.0-rc.2"
gatsby-plugin-sharp "^1.6.25"
gatsby-plugin-sharp "^1.6.26"
is-relative-url "^2.0.0"
lodash "^4.17.4"
slash "^1.0.0"
@ -4470,9 +4470,9 @@ gatsby-transformer-remark@^1.7.29:
unist-util-select "^1.5.0"
unist-util-visit "^1.1.1"
gatsby@^1.9.165:
version "1.9.165"
resolved "https://registry.yarnpkg.com/gatsby/-/gatsby-1.9.165.tgz#ca223028a1b07b9195bd25bf36855d520b1a3050"
gatsby@^1.9.166:
version "1.9.166"
resolved "https://registry.yarnpkg.com/gatsby/-/gatsby-1.9.166.tgz#556e7c3450b7cbb674ca03c776eda598d073d493"
dependencies:
async "^2.1.2"
babel-code-frame "^6.22.0"
@ -4512,7 +4512,7 @@ gatsby@^1.9.165:
front-matter "^2.1.0"
fs-extra "^4.0.1"
gatsby-1-config-css-modules "^1.0.8"
gatsby-cli "^1.1.28"
gatsby-cli "^1.1.29"
gatsby-link "^1.6.34"
gatsby-module-loader "^1.0.9"
gatsby-react-router-scroll "^1.0.8"

View File

@ -44,7 +44,7 @@
"karma": "~1.7.0",
"karma-chrome-launcher": "~2.2.0",
"karma-cli": "~1.0.1",
"karma-coverage-istanbul-reporter": "^1.3.3",
"karma-coverage-istanbul-reporter": "^1.4.1",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.2.2",

View File

@ -31,7 +31,7 @@
"file-loader": "^1.1.6",
"vue-hot-reload-api": "^2.2.4",
"vue-loader": "^13.7.0",
"vue-style-loader": "^3.0.1",
"vue-style-loader": "^3.1.1",
"vue-template-compiler": "^2.5.13",
"webpack": "^3.10.0",
"webpack-dev-server": "^2.11.1"

View File

@ -34,7 +34,7 @@
"chromatic": "npm --prefix examples/official-storybook run chromatic"
},
"devDependencies": {
"@types/lodash": "^4.14.93",
"@types/lodash": "^4.14.95",
"babel-cli": "^6.26.0",
"babel-core": "^6.26.0",
"babel-eslint": "^8.2.1",

View File

@ -298,9 +298,9 @@
version "4.14.92"
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.92.tgz#6e3cb0b71a1e12180a47a42a744e856c3ae99a57"
"@types/lodash@^4.14.93":
version "4.14.93"
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.93.tgz#a6d2a1e1601a3c29196f38ef1990b68a9afa1e1c"
"@types/lodash@^4.14.95":
version "4.14.95"
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.95.tgz#02c170690719bbaca8293d9c8cdcccb565728081"
"@types/mz@0.0.32":
version "0.0.32"
@ -8695,9 +8695,9 @@ karma-cli@~1.0.1:
dependencies:
resolve "^1.1.6"
karma-coverage-istanbul-reporter@^1.3.3:
version "1.3.3"
resolved "https://registry.yarnpkg.com/karma-coverage-istanbul-reporter/-/karma-coverage-istanbul-reporter-1.3.3.tgz#daf26051d5a0daa5838a4ce81aa4a41724bdf36b"
karma-coverage-istanbul-reporter@^1.4.1:
version "1.4.1"
resolved "https://registry.yarnpkg.com/karma-coverage-istanbul-reporter/-/karma-coverage-istanbul-reporter-1.4.1.tgz#2b42d145ddbb4868d85d52888c495a21c61d873c"
dependencies:
istanbul-api "^1.1.14"
minimatch "^3.0.4"
@ -15286,13 +15286,20 @@ vue-property-decorator@6.0.0:
reflect-metadata "^0.1.10"
vue-class-component "^6.0.0"
vue-style-loader@^3.0.0, vue-style-loader@^3.0.1:
vue-style-loader@^3.0.0:
version "3.0.3"
resolved "https://registry.yarnpkg.com/vue-style-loader/-/vue-style-loader-3.0.3.tgz#623658f81506aef9d121cdc113a4f5c9cac32df7"
dependencies:
hash-sum "^1.0.2"
loader-utils "^1.0.2"
vue-style-loader@^3.1.1:
version "3.1.1"
resolved "https://registry.yarnpkg.com/vue-style-loader/-/vue-style-loader-3.1.1.tgz#74fdef91a81d38bc0125746a1b5505e62d69e32c"
dependencies:
hash-sum "^1.0.2"
loader-utils "^1.0.2"
vue-template-compiler@^2.5.13:
version "2.5.13"
resolved "https://registry.yarnpkg.com/vue-template-compiler/-/vue-template-compiler-2.5.13.tgz#12a2aa0ecd6158ac5e5f14d294b0993f399c3d38"