diff --git a/.eslintrc.js b/.eslintrc.js
index 383b296fae2..66def470455 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -5,13 +5,13 @@ const ignore = 0;
module.exports = {
root: true,
extends: [
- 'eslint-config-airbnb',
+ 'airbnb',
'plugin:jest/recommended',
'plugin:import/react-native',
'prettier',
'prettier/react',
],
- plugins: ['prettier', 'jest', 'react', 'json'],
+ plugins: ['prettier', 'jest', 'import', 'react', 'jsx-a11y', 'json'],
parser: 'babel-eslint',
parserOptions: {
sourceType: 'module',
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6472efbf2df..0f6f5992383 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -208,7 +208,7 @@
- Addon Storysource improvements [#3040](https://github.com/storybooks/storybook/pull/3040)
- #3029 use @storybook/podda to fix npm engine version in podda [#3033](https://github.com/storybooks/storybook/pull/3033)
- Add moduleMetdata decorator for supplying common Angular metadata [#2959](https://github.com/storybooks/storybook/pull/2959)
-- [Addon Storysource] Add auto scrolling to the selected story [#3025](https://github.com/storybooks/storybook/pull/3025)
+- `Addon Storysource` Add auto scrolling to the selected story [#3025](https://github.com/storybooks/storybook/pull/3025)
- add GitHub flavored markdown notes [#2946](https://github.com/storybooks/storybook/pull/2946)
- Added beforeScreenshot config option to addons/storyshots, to allow testing of components with mounting animations [#2972](https://github.com/storybooks/storybook/pull/2972)
- Enable groupId option for knobs to be organized into sub panels. [#2661](https://github.com/storybooks/storybook/pull/2661)
diff --git a/addons/a11y/package.json b/addons/a11y/package.json
index e80eb8a4b0a..1d15bfffb69 100644
--- a/addons/a11y/package.json
+++ b/addons/a11y/package.json
@@ -27,6 +27,8 @@
"dependencies": {
"@storybook/components": "^3.4.0-alpha.9",
"axe-core": "^2.6.1",
+ "babel-runtime": "^6.26.0",
+ "glamor": "^2.20.40",
"glamorous": "^4.11.6",
"prop-types": "^15.6.0"
},
diff --git a/addons/actions/package.json b/addons/actions/package.json
index 61d7ae9a9fe..cc7531dfc90 100644
--- a/addons/actions/package.json
+++ b/addons/actions/package.json
@@ -21,7 +21,9 @@
},
"dependencies": {
"@storybook/components": "^3.4.0-alpha.9",
+ "babel-runtime": "^6.26.0",
"deep-equal": "^1.0.1",
+ "glamor": "^2.20.40",
"glamorous": "^4.11.6",
"global": "^4.3.2",
"make-error": "^1.3.4",
diff --git a/addons/background/README.md b/addons/background/README.md
index 6137b9ac0a4..0dae593a512 100644
--- a/addons/background/README.md
+++ b/addons/background/README.md
@@ -3,13 +3,13 @@
[](https://circleci.com/gh/storybooks/storybook)
[](https://www.codefactor.io/repository/github/storybooks/storybook)
[](https://snyk.io/test/github/storybooks/storybook/8f36abfd6697e58cd76df3526b52e4b9dc894847)
-[](https://bettercodehub.com/results/storybooks/storybook) [](https://codecov.io/gh/storybooks/storybook)
+[](https://bettercodehub.com/results/storybooks/storybook) [](https://codecov.io/gh/storybooks/storybook)
[](https://now-examples-slackin-rrirkqohko.now.sh/)
[](#backers) [](#sponsors)
* * *
-Storybook Centered Decorator can be used to center components inside the preview in [Storybook](https://storybook.js.org).
+Storybook Background Addon can be used to change background colors inside the preview in [Storybook](https://storybook.js.org).
[Framework Support](https://github.com/storybooks/storybook/blob/master/ADDONS_SUPPORT.md)
@@ -18,7 +18,7 @@ Storybook Centered Decorator can be used to center components inside the preview
## Installation
```sh
-npm i --save @storybook/addon-backgrounds
+npm i -D @storybook/addon-backgrounds
```
## Configuration
diff --git a/addons/background/package.json b/addons/background/package.json
index 795ebfee8f3..67a612cf7d2 100644
--- a/addons/background/package.json
+++ b/addons/background/package.json
@@ -24,6 +24,7 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
+ "babel-runtime": "^6.26.0",
"global": "^4.3.2",
"prop-types": "^15.6.0"
},
diff --git a/addons/centered/package.json b/addons/centered/package.json
index aa1d30c338f..b76680ad85f 100644
--- a/addons/centered/package.json
+++ b/addons/centered/package.json
@@ -10,6 +10,7 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
+ "babel-runtime": "^6.26.0",
"global": "^4.3.2"
},
"devDependencies": {
diff --git a/addons/events/docs/.DS_Store b/addons/events/docs/.DS_Store
deleted file mode 100644
index 817e5e65edf..00000000000
Binary files a/addons/events/docs/.DS_Store and /dev/null differ
diff --git a/addons/events/package.json b/addons/events/package.json
index 0ef65dd6ab5..3fe657c2cc8 100644
--- a/addons/events/package.json
+++ b/addons/events/package.json
@@ -24,8 +24,7 @@
"babel-runtime": "^6.26.0",
"format-json": "^1.0.3",
"prop-types": "^15.6.0",
- "react-textarea-autosize": "^5.2.1",
- "uuid": "^3.2.1"
+ "react-textarea-autosize": "^5.2.1"
},
"peerDependencies": {
"@storybook/addons": "^3.3.0",
diff --git a/addons/graphql/package.json b/addons/graphql/package.json
index 1b71737b69e..1e02a6f50bf 100644
--- a/addons/graphql/package.json
+++ b/addons/graphql/package.json
@@ -22,6 +22,7 @@
"storybook": "start-storybook -p 9001"
},
"dependencies": {
+ "babel-runtime": "^6.26.0",
"global": "^4.3.2",
"graphiql": "^0.11.11",
"graphql": "^0.13.1",
diff --git a/addons/info/package.json b/addons/info/package.json
index 9982a2c0265..86dd3e6df6b 100644
--- a/addons/info/package.json
+++ b/addons/info/package.json
@@ -18,6 +18,7 @@
"@storybook/client-logger": "^3.4.0-alpha.9",
"@storybook/components": "^3.4.0-alpha.9",
"babel-runtime": "^6.26.0",
+ "glamor": "^2.20.40",
"glamorous": "^4.11.6",
"global": "^4.3.2",
"marksy": "^6.0.3",
diff --git a/addons/info/src/__snapshots__/index.test.js.snap b/addons/info/src/__snapshots__/index.test.js.snap
index d65df80a925..baccb582c91 100644
--- a/addons/info/src/__snapshots__/index.test.js.snap
+++ b/addons/info/src/__snapshots__/index.test.js.snap
@@ -158,9 +158,7 @@ containing **bold**, *cursive* text, \`code\` and [a link](https://github.com)"
>
- function func(x) {
- return x + 1;
- }
+ function func(x) {return x + 1;}
[object Object]
diff --git a/addons/jest/package.json b/addons/jest/package.json
index e99f8cc759a..1c70c6bca6e 100644
--- a/addons/jest/package.json
+++ b/addons/jest/package.json
@@ -26,6 +26,7 @@
},
"dependencies": {
"@storybook/components": "^3.4.0-alpha.9",
+ "babel-runtime": "^6.26.0",
"glamor": "^2.20.40",
"glamorous": "^4.11.6",
"global": "^4.3.2",
diff --git a/addons/links/package.json b/addons/links/package.json
index 0b190eb1fab..75147c6853a 100644
--- a/addons/links/package.json
+++ b/addons/links/package.json
@@ -23,6 +23,7 @@
},
"dependencies": {
"@storybook/components": "^3.4.0-alpha.9",
+ "babel-runtime": "^6.26.0",
"global": "^4.3.2",
"prop-types": "^15.5.10"
},
@@ -30,8 +31,7 @@
"@storybook/react": "^3.4.0-alpha.9",
"enzyme": "^3.3.0",
"react": "^16.1.0",
- "react-dom": "^16.1.0",
- "shelljs": "^0.8.1"
+ "react-dom": "^16.1.0"
},
"peerDependencies": {
"@storybook/addons": "^3.3.0",
diff --git a/addons/options/package.json b/addons/options/package.json
index 56876fccaf2..d7063ca82d0 100644
--- a/addons/options/package.json
+++ b/addons/options/package.json
@@ -19,6 +19,9 @@
"prepare": "node ../../scripts/prepare.js",
"storybook": "start-storybook -p 9001"
},
+ "dependencies": {
+ "babel-runtime": "^6.26.0"
+ },
"devDependencies": {
"@storybook/react": "^3.4.0-alpha.9"
},
diff --git a/addons/storyshots/.babelrc b/addons/storyshots/.babelrc
deleted file mode 100644
index 7ecf0273a6b..00000000000
--- a/addons/storyshots/.babelrc
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "presets": ["env", "stage-0", "react"],
- "plugins": [
- "transform-runtime"
- ]
-}
diff --git a/addons/storyshots/package.json b/addons/storyshots/package.json
index 5b96d6543be..bb249e2cf43 100644
--- a/addons/storyshots/package.json
+++ b/addons/storyshots/package.json
@@ -23,23 +23,15 @@
"global": "^4.3.2",
"jest-image-snapshot": "^2.3.0",
"jest-specific-snapshot": "^0.3.0",
- "prop-types": "^15.6.0",
"puppeteer": "^1.1.1",
"read-pkg-up": "^3.0.0"
},
"devDependencies": {
"@storybook/addon-actions": "^3.4.0-alpha.9",
+ "@storybook/addon-links": "^3.4.0-alpha.9",
"@storybook/addons": "^3.4.0-alpha.9",
"@storybook/react": "^3.4.0-alpha.9",
- "babel-cli": "^6.26.0",
- "babel-jest": "^22.4.1",
- "babel-plugin-transform-runtime": "^6.23.0",
- "babel-preset-env": "^1.6.0",
- "babel-preset-react": "^6.24.1",
- "babel-preset-stage-0": "^6.24.1",
"enzyme-to-json": "^3.3.1",
- "jest": "^22.4.2",
- "jest-cli": "^22.4.2",
"react": "^16.1.0",
"react-dom": "^16.1.0"
},
diff --git a/addons/storyshots/stories/required_with_context/Welcome.stories.js b/addons/storyshots/stories/required_with_context/Welcome.stories.js
index bec79b78a25..2837b632c0a 100644
--- a/addons/storyshots/stories/required_with_context/Welcome.stories.js
+++ b/addons/storyshots/stories/required_with_context/Welcome.stories.js
@@ -1,7 +1,7 @@
import React from 'react';
-import { storiesOf } from '@storybook/react'; // eslint-disable-line
-import { linkTo } from '@storybook/addon-links'; // eslint-disable-line
+import { storiesOf } from '@storybook/react';
+import { linkTo } from '@storybook/addon-links';
import { Welcome } from '@storybook/react/demo';
storiesOf('Welcome', module).add('to Storybook', () => );
diff --git a/addons/storysource/package.json b/addons/storysource/package.json
index 1e35b5d7aa0..ad2af6d00a1 100644
--- a/addons/storysource/package.json
+++ b/addons/storysource/package.json
@@ -24,6 +24,7 @@
"acorn-es7": "^0.1.0",
"acorn-jsx": "^4.1.1",
"acorn-stage3": "^0.5.0",
+ "babel-runtime": "^6.26.0",
"estraverse": "^4.2.0",
"loader-utils": "^1.1.0",
"prettier": "^1.10.2",
diff --git a/addons/viewport/package.json b/addons/viewport/package.json
index 6ce10ebdf97..ec91afe8a03 100644
--- a/addons/viewport/package.json
+++ b/addons/viewport/package.json
@@ -12,6 +12,7 @@
},
"dependencies": {
"@storybook/components": "^3.4.0-alpha.9",
+ "babel-runtime": "^6.26.0",
"global": "^4.3.2",
"prop-types": "^15.5.10"
},
diff --git a/app/angular/.babelrc b/app/angular/.babelrc
deleted file mode 100644
index 845c3cf4d75..00000000000
--- a/app/angular/.babelrc
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "presets": ["env", "stage-0", "react"]
-}
diff --git a/app/angular/package.json b/app/angular/package.json
index 8606cb244b9..a88a150d33a 100644
--- a/app/angular/package.json
+++ b/app/angular/package.json
@@ -23,8 +23,6 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
- "@storybook/addon-actions": "^3.4.0-alpha.9",
- "@storybook/addon-links": "^3.4.0-alpha.9",
"@storybook/addons": "^3.4.0-alpha.9",
"@storybook/channel-postmessage": "^3.4.0-alpha.9",
"@storybook/core": "^3.4.0-alpha.9",
@@ -32,69 +30,43 @@
"@storybook/ui": "^3.4.0-alpha.9",
"airbnb-js-shims": "^1.4.1",
"angular2-template-loader": "^0.6.2",
- "autoprefixer": "^7.2.6",
- "babel-core": "^6.26.0",
"babel-loader": "^7.0.0",
"babel-plugin-macros": "^2.1.0",
- "babel-plugin-react-docgen": "^1.8.2",
"babel-preset-env": "^1.6.0",
- "babel-preset-react": "^6.24.1",
- "babel-preset-react-app": "^3.1.1",
"babel-preset-stage-0": "^6.24.1",
"babel-runtime": "^6.23.0",
"case-sensitive-paths-webpack-plugin": "^2.0.0",
- "common-tags": "^1.7.2",
- "configstore": "^3.1.0",
"core-js": "^2.4.1",
"cross-env": "^5.1.1",
- "css-loader": "^0.28.10",
"dotenv-webpack": "^1.5.4",
- "express": "^4.15.3",
- "file-loader": "^1.1.9",
- "find-cache-dir": "^1.0.0",
"global": "^4.3.2",
"html-loader": "^0.5.5",
"html-webpack-plugin": "^2.30.1",
- "json-loader": "^0.5.4",
- "json-stringify-safe": "^5.0.1",
"json5": "^0.5.1",
- "lodash.pick": "^4.4.0",
"markdown-loader": "^2.0.2",
"node-sass": "^4.7.2",
- "postcss-flexbugs-fixes": "^3.3.0",
- "postcss-loader": "^2.1.0",
- "prop-types": "^15.5.10",
- "qs": "^6.5.1",
"raw-loader": "^0.5.1",
"react": "^16.0.0",
"react-dev-utils": "^5.0.0",
"react-dom": "^16.0.0",
- "react-modal": "^3.3.1",
"redux": "^3.6.0",
- "request": "^2.81.0",
- "rxjs": "^5.4.2",
"sass-loader": "^6.0.6",
- "style-loader": "^0.20.2",
"ts-loader": "^3.5.0",
"uglifyjs-webpack-plugin": "^1.2.2",
- "url-loader": "^0.6.2",
"util-deprecate": "^1.0.2",
"webpack": "^3.11.0",
+ "webpack-hot-middleware": "^2.21.0",
"zone.js": "^0.8.20"
},
"devDependencies": {
- "babel-cli": "^6.26.0",
- "babel-plugin-transform-decorators": "^6.24.1",
- "babel-plugin-transform-decorators-legacy": "^1.3.4",
- "codelyzer": "^4.1.0",
"mock-fs": "^4.3.0",
- "nodemon": "^1.15.1",
- "typescript": "^2.7.2"
+ "nodemon": "^1.15.1"
},
"peerDependencies": {
"@angular/common": ">=4.0.0",
"@angular/compiler": ">=4.0.0",
"@angular/core": ">=4.0.0",
+ "@angular/forms": ">=4.0.0",
"@angular/platform-browser": ">=4.0.0",
"@angular/platform-browser-dynamic": ">=4.0.0"
}
diff --git a/app/angular/src/server/addons.js b/app/angular/src/server/addons.js
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/app/angular/src/server/babel_config.js b/app/angular/src/server/babel_config.js
index 23b2adaab97..23ed1ebeea2 100644
--- a/app/angular/src/server/babel_config.js
+++ b/app/angular/src/server/babel_config.js
@@ -63,12 +63,5 @@ export default function(configDir) {
}
}
- const finalConfig = babelConfig || defaultConfig;
- // Ensure plugins are defined or fallback to an array to avoid empty values.
- const babelConfigPlugins = finalConfig.plugins || [];
- // If `babelConfigPlugins` is not an `Array`, calling `concat` will inject it
- // as a single value, if it is an `Array` it will be spreaded.
- finalConfig.plugins = [].concat(babelConfigPlugins);
-
- return finalConfig;
+ return babelConfig || defaultConfig;
}
diff --git a/app/angular/src/server/babel_config.test.js b/app/angular/src/server/babel_config.test.js
deleted file mode 100644
index f587597af96..00000000000
--- a/app/angular/src/server/babel_config.test.js
+++ /dev/null
@@ -1,89 +0,0 @@
-import loadBabelConfig from './babel_config';
-
-// eslint-disable-next-line global-require
-jest.mock('fs', () => require('../../../../__mocks__/fs'));
-jest.mock('path', () => ({
- resolve: () => '.babelrc',
- parse: require.requireActual('path').parse,
- join: require.requireActual('path').join,
- dirname: require.requireActual('path').dirname,
-}));
-
-const setup = ({ files }) => {
- // eslint-disable-next-line no-underscore-dangle, global-require
- require('fs').__setMockFiles(files);
-};
-
-describe('babel_config', () => {
- // As the 'fs' is going to be mocked, let's call require.resolve
- // so the require.cache has the correct route to the file.
- // In fact let's use it in the tests :)
-
- it('should return the config with the extra plugins when `plugins` is an array.', () => {
- setup({
- files: {
- '.babelrc': `{
- "presets": [
- "env",
- "foo-preset"
- ],
- "plugins": [
- "foo-plugin"
- ]
- }`,
- },
- });
-
- const config = loadBabelConfig('.foo');
-
- expect(config).toEqual({
- babelrc: false,
- plugins: ['foo-plugin'],
- presets: ['env', 'foo-preset'],
- });
- });
-
- it('should return the config with the extra plugins when `plugins` is not an array.', () => {
- setup({
- files: {
- '.babelrc': `{
- "presets": [
- "env",
- "foo-preset"
- ],
- "plugins": "bar-plugin"
- }`,
- },
- });
-
- const config = loadBabelConfig('.bar');
-
- expect(config).toEqual({
- babelrc: false,
- plugins: ['bar-plugin'],
- presets: ['env', 'foo-preset'],
- });
- });
-
- it('should return the config only with the extra plugins when `plugins` is not present.', () => {
- // Mock a `.babelrc` config file with no plugins key.
- setup({
- files: {
- '.babelrc': `{
- "presets": [
- "env",
- "foo-preset"
- ]
- }`,
- },
- });
-
- const config = loadBabelConfig('.biz');
-
- expect(config).toEqual({
- babelrc: false,
- plugins: [],
- presets: ['env', 'foo-preset'],
- });
- });
-});
diff --git a/app/angular/src/server/config.js b/app/angular/src/server/config.js
index 09e5f89b35a..d9cef99d82f 100644
--- a/app/angular/src/server/config.js
+++ b/app/angular/src/server/config.js
@@ -33,13 +33,10 @@ export default function(configType, baseConfig, configDir) {
// Check whether addons.js file exists inside the storybook.
// Load the default addons.js file if it's missing.
- const storybookDefaultAddonsPath = path.resolve(__dirname, 'addons.js');
const storybookCustomAddonsPath = path.resolve(configDir, 'addons.js');
if (fs.existsSync(storybookCustomAddonsPath)) {
logger.info('=> Loading custom addons config.');
config.entry.manager.unshift(storybookCustomAddonsPath);
- } else {
- config.entry.manager.unshift(storybookDefaultAddonsPath);
}
// Check whether project has Angular CLI configuration file
diff --git a/app/angular/src/server/config/babel.js b/app/angular/src/server/config/babel.js
index 0ce366ebe9a..5727b2b0f25 100644
--- a/app/angular/src/server/config/babel.js
+++ b/app/angular/src/server/config/babel.js
@@ -12,18 +12,6 @@ module.exports = {
},
],
require.resolve('babel-preset-stage-0'),
- require.resolve('babel-preset-react'),
- ],
- plugins: [
- require.resolve('babel-plugin-macros'),
- require.resolve('babel-plugin-transform-regenerator'),
- [
- require.resolve('babel-plugin-transform-runtime'),
- {
- helpers: true,
- polyfill: true,
- regenerator: true,
- },
- ],
],
+ plugins: [require.resolve('babel-plugin-macros')],
};
diff --git a/app/angular/src/server/config/babel.prod.js b/app/angular/src/server/config/babel.prod.js
index d772440e5eb..2a2d52e37f4 100644
--- a/app/angular/src/server/config/babel.prod.js
+++ b/app/angular/src/server/config/babel.prod.js
@@ -11,8 +11,15 @@ module.exports = {
// Don't try to find .babelrc because we want to force this configuration.
babelrc: false,
presets: [
- require.resolve('babel-preset-env'),
+ [
+ require.resolve('babel-preset-env'),
+ {
+ targets: {
+ browsers: ['last 2 versions', 'safari >= 7'],
+ },
+ modules: false,
+ },
+ ],
require.resolve('babel-preset-stage-0'),
- require.resolve('babel-preset-react'),
],
};
diff --git a/app/angular/src/server/config/webpack.config.js b/app/angular/src/server/config/webpack.config.js
index c9059d3cd09..1e2d4360b82 100644
--- a/app/angular/src/server/config/webpack.config.js
+++ b/app/angular/src/server/config/webpack.config.js
@@ -88,10 +88,10 @@ export default function(configDir) {
test: /\.md$/,
use: [
{
- loader: 'html-loader',
+ loader: require.resolve('html-loader'),
},
{
- loader: 'markdown-loader',
+ loader: require.resolve('markdown-loader'),
},
],
},
diff --git a/app/angular/src/server/config/webpack.config.prod.js b/app/angular/src/server/config/webpack.config.prod.js
index 9465dc127fe..da46d98edbd 100644
--- a/app/angular/src/server/config/webpack.config.prod.js
+++ b/app/angular/src/server/config/webpack.config.prod.js
@@ -101,10 +101,10 @@ export default function(configDir) {
test: /\.md$/,
use: [
{
- loader: 'html-loader',
+ loader: require.resolve('html-loader'),
},
{
- loader: 'markdown-loader',
+ loader: require.resolve('markdown-loader'),
},
],
},
diff --git a/app/angular/src/server/iframe.html.ejs b/app/angular/src/server/iframe.html.ejs
index e730fdfb423..733fdd5b82b 100644
--- a/app/angular/src/server/iframe.html.ejs
+++ b/app/angular/src/server/iframe.html.ejs
@@ -5,11 +5,6 @@
-
Storybook
<%= htmlWebpackPlugin.options.data.previewHead %>
diff --git a/app/polymer/.babelrc b/app/polymer/.babelrc
deleted file mode 100644
index 845c3cf4d75..00000000000
--- a/app/polymer/.babelrc
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "presets": ["env", "stage-0", "react"]
-}
diff --git a/app/polymer/package.json b/app/polymer/package.json
index 76b13cbcbaf..4cf8a2270ef 100644
--- a/app/polymer/package.json
+++ b/app/polymer/package.json
@@ -30,55 +30,39 @@
"@storybook/ui": "^3.4.0-alpha.9",
"@webcomponents/webcomponentsjs": "^1.1.0",
"airbnb-js-shims": "^1.4.1",
- "autoprefixer": "^7.2.6",
- "babel-core": "^6.26.0",
"babel-loader": "^7.1.2",
"babel-plugin-macros": "^2.1.0",
- "babel-plugin-react-docgen": "^1.8.2",
"babel-plugin-transform-regenerator": "^6.26.0",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-polyfill": "^6.26.0",
"babel-preset-env": "^1.6.0",
"babel-preset-minify": "^0.3.0",
- "babel-preset-react": "^6.24.1",
- "babel-preset-react-app": "^3.1.1",
"babel-preset-stage-0": "^6.24.1",
"babel-runtime": "^6.26.0",
"case-sensitive-paths-webpack-plugin": "^2.1.1",
"common-tags": "^1.4.0",
- "configstore": "^3.1.1",
"copy-webpack-plugin": "^4.4.2",
"core-js": "^2.5.1",
- "css-loader": "^0.28.10",
"dotenv-webpack": "^1.5.4",
- "express": "^4.16.2",
- "file-loader": "^1.1.9",
"find-cache-dir": "^1.0.0",
"global": "^4.3.2",
"html-webpack-plugin": "^2.30.1",
- "json-loader": "^0.5.7",
- "json-stringify-safe": "^5.0.1",
"json5": "^0.5.1",
- "lodash.pick": "^4.4.0",
"polymer-webpack-loader": "2.0.1",
- "postcss-flexbugs-fixes": "^3.3.0",
- "postcss-loader": "^2.1.0",
- "prop-types": "^15.6.0",
- "qs": "^6.5.1",
"react": "^16.0.0",
"react-dev-utils": "^5.0.0",
"react-dom": "^16.0.0",
- "react-modal": "^3.3.1",
"redux": "^3.7.2",
- "request": "^2.83.0",
- "style-loader": "^0.20.2",
"uglifyjs-webpack-plugin": "^1.2.2",
- "url-loader": "^0.6.2",
"util-deprecate": "^1.0.2",
- "webpack": "^3.11.0"
+ "webpack": "^3.11.0",
+ "webpack-hot-middleware": "^2.21.0"
},
"devDependencies": {
- "babel-cli": "^6.26.0",
"nodemon": "^1.15.1"
+ },
+ "peerDependencies": {
+ "babel-core": "^6.26.0 || ^7.0.0-0",
+ "babel-runtime": ">=6.0.0"
}
}
diff --git a/app/polymer/src/server/addons.js b/app/polymer/src/server/addons.js
deleted file mode 100644
index 280e2ac1365..00000000000
--- a/app/polymer/src/server/addons.js
+++ /dev/null
@@ -1,2 +0,0 @@
-// import '@storybook/addon-actions/register';
-// import '@storybook/addon-links/register';
diff --git a/app/polymer/src/server/babel_config.js b/app/polymer/src/server/babel_config.js
index f5294fe1ca5..23ed1ebeea2 100644
--- a/app/polymer/src/server/babel_config.js
+++ b/app/polymer/src/server/babel_config.js
@@ -63,20 +63,5 @@ export default function(configDir) {
}
}
- const finalConfig = babelConfig || defaultConfig;
- // Ensure plugins are defined or fallback to an array to avoid empty values.
- const babelConfigPlugins = finalConfig.plugins || [];
- const extraPlugins = [
- [
- require.resolve('babel-plugin-react-docgen'),
- {
- DOC_GEN_COLLECTION_NAME: 'STORYBOOK_REACT_CLASSES',
- },
- ],
- ];
- // If `babelConfigPlugins` is not an `Array`, calling `concat` will inject it
- // as a single value, if it is an `Array` it will be spreaded.
- finalConfig.plugins = [].concat(babelConfigPlugins, extraPlugins);
-
- return finalConfig;
+ return babelConfig || defaultConfig;
}
diff --git a/app/polymer/src/server/babel_config.test.js b/app/polymer/src/server/babel_config.test.js
deleted file mode 100644
index ba991adcd4e..00000000000
--- a/app/polymer/src/server/babel_config.test.js
+++ /dev/null
@@ -1,110 +0,0 @@
-import loadBabelConfig from './babel_config';
-
-// eslint-disable-next-line global-require
-jest.mock('fs', () => require('../../../../__mocks__/fs'));
-jest.mock('path', () => ({
- resolve: () => '.babelrc',
-}));
-
-const setup = ({ files }) => {
- // eslint-disable-next-line no-underscore-dangle, global-require
- require('fs').__setMockFiles(files);
-};
-
-describe('babel_config', () => {
- // As the 'fs' is going to be mocked, let's call require.resolve
- // so the require.cache has the correct route to the file.
- // In fact let's use it in the tests :)
- const babelPluginReactDocgenPath = require.resolve('babel-plugin-react-docgen');
-
- it('should return the config with the extra plugins when `plugins` is an array.', () => {
- setup({
- files: {
- '.babelrc': `{
- "presets": [
- "env",
- "foo-preset"
- ],
- "plugins": [
- "foo-plugin"
- ]
- }`,
- },
- });
-
- const config = loadBabelConfig('.foo');
-
- expect(config).toEqual({
- babelrc: false,
- plugins: [
- 'foo-plugin',
- [
- babelPluginReactDocgenPath,
- {
- DOC_GEN_COLLECTION_NAME: 'STORYBOOK_REACT_CLASSES',
- },
- ],
- ],
- presets: ['env', 'foo-preset'],
- });
- });
-
- it('should return the config with the extra plugins when `plugins` is not an array.', () => {
- setup({
- files: {
- '.babelrc': `{
- "presets": [
- "env",
- "foo-preset"
- ],
- "plugins": "bar-plugin"
- }`,
- },
- });
-
- const config = loadBabelConfig('.bar');
-
- expect(config).toEqual({
- babelrc: false,
- plugins: [
- 'bar-plugin',
- [
- babelPluginReactDocgenPath,
- {
- DOC_GEN_COLLECTION_NAME: 'STORYBOOK_REACT_CLASSES',
- },
- ],
- ],
- presets: ['env', 'foo-preset'],
- });
- });
-
- it('should return the config only with the extra plugins when `plugins` is not present.', () => {
- // Mock a `.babelrc` config file with no plugins key.
- setup({
- files: {
- '.babelrc': `{
- "presets": [
- "env",
- "foo-preset"
- ]
- }`,
- },
- });
-
- const config = loadBabelConfig('.biz');
-
- expect(config).toEqual({
- babelrc: false,
- plugins: [
- [
- babelPluginReactDocgenPath,
- {
- DOC_GEN_COLLECTION_NAME: 'STORYBOOK_REACT_CLASSES',
- },
- ],
- ],
- presets: ['env', 'foo-preset'],
- });
- });
-});
diff --git a/app/polymer/src/server/config.js b/app/polymer/src/server/config.js
index 49ff8de4a4d..b9b7e3364d7 100644
--- a/app/polymer/src/server/config.js
+++ b/app/polymer/src/server/config.js
@@ -33,13 +33,10 @@ export default function(configType, baseConfig, configDir) {
// Check whether addons.js file exists inside the storybook.
// Load the default addons.js file if it's missing.
// Insert it after polyfills.js, but before client/manager.
- const storybookDefaultAddonsPath = path.resolve(__dirname, 'addons.js');
const storybookCustomAddonsPath = path.resolve(configDir, 'addons.js');
if (fs.existsSync(storybookCustomAddonsPath)) {
logger.info('=> Loading custom addons config.');
config.entry.manager.splice(1, 0, storybookCustomAddonsPath);
- } else {
- config.entry.manager.splice(1, 0, storybookDefaultAddonsPath);
}
const defaultConfig = createDefaultWebpackConfig(config);
diff --git a/app/polymer/src/server/config/babel.js b/app/polymer/src/server/config/babel.js
index 0ce366ebe9a..77a413a7cb4 100644
--- a/app/polymer/src/server/config/babel.js
+++ b/app/polymer/src/server/config/babel.js
@@ -12,7 +12,6 @@ module.exports = {
},
],
require.resolve('babel-preset-stage-0'),
- require.resolve('babel-preset-react'),
],
plugins: [
require.resolve('babel-plugin-macros'),
diff --git a/app/polymer/src/server/config/babel.prod.js b/app/polymer/src/server/config/babel.prod.js
index fe982349f25..5ceaf68bae9 100644
--- a/app/polymer/src/server/config/babel.prod.js
+++ b/app/polymer/src/server/config/babel.prod.js
@@ -12,7 +12,6 @@ module.exports = {
},
],
require.resolve('babel-preset-stage-0'),
- require.resolve('babel-preset-react'),
[
require.resolve('babel-preset-minify'),
{
diff --git a/app/polymer/src/server/config/webpack.config.js b/app/polymer/src/server/config/webpack.config.js
index 1d0b1ccc3d9..6a4644f4ee4 100644
--- a/app/polymer/src/server/config/webpack.config.js
+++ b/app/polymer/src/server/config/webpack.config.js
@@ -89,10 +89,6 @@ export default function(configDir) {
// Add support to NODE_PATH. With this we could avoid relative path imports.
// Based on this CRA feature: https://github.com/facebookincubator/create-react-app/issues/253
modules: ['node_modules'].concat(nodePaths),
- alias: {
- react$: require.resolve('react'),
- 'react-dom$': require.resolve('react-dom'),
- },
},
performance: {
hints: false,
diff --git a/app/polymer/src/server/config/webpack.config.prod.js b/app/polymer/src/server/config/webpack.config.prod.js
index 34cb9c69c34..65328637e22 100644
--- a/app/polymer/src/server/config/webpack.config.prod.js
+++ b/app/polymer/src/server/config/webpack.config.prod.js
@@ -100,10 +100,6 @@ export default function(configDir) {
// Add support to NODE_PATH. With this we could avoid relative path imports.
// Based on this CRA feature: https://github.com/facebookincubator/create-react-app/issues/253
modules: ['node_modules'].concat(nodePaths),
- alias: {
- react$: require.resolve('react'),
- 'react-dom$': require.resolve('react-dom'),
- },
},
};
diff --git a/app/react-native/.babelrc b/app/react-native/.babelrc
deleted file mode 100644
index 845c3cf4d75..00000000000
--- a/app/react-native/.babelrc
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "presets": ["env", "stage-0", "react"]
-}
diff --git a/app/react-native/package.json b/app/react-native/package.json
index d68af17a29d..bd55c7d822b 100644
--- a/app/react-native/package.json
+++ b/app/react-native/package.json
@@ -31,40 +31,32 @@
"@storybook/channel-websocket": "^3.4.0-alpha.9",
"@storybook/core": "^3.4.0-alpha.9",
"@storybook/ui": "^3.4.0-alpha.9",
- "autoprefixer": "^7.2.6",
"babel-loader": "^7.1.2",
"babel-plugin-macros": "^2.1.0",
"babel-plugin-syntax-async-functions": "^6.13.0",
"babel-plugin-syntax-trailing-function-commas": "^6.22.0",
"babel-plugin-transform-class-properties": "^6.24.1",
"babel-plugin-transform-object-rest-spread": "^6.23.0",
- "babel-plugin-transform-react-constant-elements": "^6.23.0",
"babel-plugin-transform-regenerator": "^6.26.0",
"babel-plugin-transform-runtime": "^6.23.0",
- "babel-polyfill": "^6.26.0",
"babel-preset-env": "^1.6.1",
"babel-preset-minify": "^0.3.0",
"babel-preset-react": "^6.24.1",
- "babel-preset-stage-0": "^6.24.1",
"babel-runtime": "^6.26.0",
"case-sensitive-paths-webpack-plugin": "^2.1.1",
"commander": "^2.14.1",
- "css-loader": "^0.28.10",
"express": "^4.16.2",
- "file-loader": "^1.1.9",
"find-cache-dir": "^1.0.0",
"global": "^4.3.2",
+ "html-loader": "^0.5.5",
"html-webpack-plugin": "^2.30.1",
- "json-loader": "^0.5.7",
"json5": "^0.5.1",
- "postcss-loader": "^2.1.0",
+ "markdown-loader": "^2.0.2",
"prop-types": "^15.6.0",
"react-native-compat": "^1.0.0",
"react-native-iphone-x-helper": "^1.0.2",
"shelljs": "^0.8.1",
- "style-loader": "^0.20.2",
"uglifyjs-webpack-plugin": "^1.2.2",
- "url-loader": "^0.6.2",
"url-parse": "^1.1.9",
"util-deprecate": "^1.0.2",
"uuid": "^3.2.1",
@@ -78,6 +70,7 @@
},
"peerDependencies": {
"babel-core": "^6.26.0 || ^7.0.0-0",
+ "babel-runtime": ">=6.0.0",
"react": "*",
"react-native": ">=0.51.0"
}
diff --git a/app/react-native/src/server/config/webpack.config.js b/app/react-native/src/server/config/webpack.config.js
index f4048c4b380..7739a77e6ab 100644
--- a/app/react-native/src/server/config/webpack.config.js
+++ b/app/react-native/src/server/config/webpack.config.js
@@ -39,10 +39,10 @@ const getConfig = options => ({
test: /\.md$/,
use: [
{
- loader: 'html-loader',
+ loader: require.resolve('html-loader'),
},
{
- loader: 'markdown-loader',
+ loader: require.resolve('markdown-loader'),
},
],
},
diff --git a/app/react-native/src/server/config/webpack.config.prod.js b/app/react-native/src/server/config/webpack.config.prod.js
index 629710db51b..578a4b57ff0 100644
--- a/app/react-native/src/server/config/webpack.config.prod.js
+++ b/app/react-native/src/server/config/webpack.config.prod.js
@@ -59,10 +59,10 @@ const getConfig = options => {
test: /\.md$/,
use: [
{
- loader: 'html-loader',
+ loader: require.resolve('html-loader'),
},
{
- loader: 'markdown-loader',
+ loader: require.resolve('markdown-loader'),
},
],
},
diff --git a/app/react/.babelrc b/app/react/.babelrc
deleted file mode 100644
index 845c3cf4d75..00000000000
--- a/app/react/.babelrc
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "presets": ["env", "stage-0", "react"]
-}
diff --git a/app/react/package.json b/app/react/package.json
index 2d59d648e75..1cec207f357 100644
--- a/app/react/package.json
+++ b/app/react/package.json
@@ -32,7 +32,6 @@
"@storybook/node-logger": "^3.4.0-alpha.9",
"@storybook/ui": "^3.4.0-alpha.9",
"airbnb-js-shims": "^1.4.1",
- "autoprefixer": "^7.2.6",
"babel-loader": "^7.1.2",
"babel-plugin-macros": "^2.1.0",
"babel-plugin-react-docgen": "^1.8.2",
@@ -41,47 +40,35 @@
"babel-preset-env": "^1.6.1",
"babel-preset-minify": "^0.3.0",
"babel-preset-react": "^6.24.1",
- "babel-preset-react-app": "^3.1.1",
"babel-preset-stage-0": "^6.24.1",
"babel-runtime": "^6.26.0",
"case-sensitive-paths-webpack-plugin": "^2.1.1",
"common-tags": "^1.7.2",
- "configstore": "^3.1.1",
"core-js": "^2.5.3",
- "css-loader": "^0.28.10",
"dotenv-webpack": "^1.5.4",
- "express": "^4.16.2",
- "file-loader": "^1.1.9",
"find-cache-dir": "^1.0.0",
"glamor": "^2.20.40",
"glamorous": "^4.11.6",
"global": "^4.3.2",
"html-loader": "^0.5.5",
"html-webpack-plugin": "^2.30.1",
- "json-loader": "^0.5.7",
- "json-stringify-safe": "^5.0.1",
"json5": "^0.5.1",
"lodash.flattendeep": "^4.4.0",
"markdown-loader": "^2.0.2",
- "npmlog": "^4.1.2",
- "postcss-flexbugs-fixes": "^3.3.0",
- "postcss-loader": "^2.1.0",
"prop-types": "^15.6.0",
- "qs": "^6.5.1",
"react-dev-utils": "^5.0.0",
"redux": "^3.7.2",
- "request": "^2.83.0",
- "style-loader": "^0.20.2",
"uglifyjs-webpack-plugin": "^1.2.2",
- "url-loader": "^0.6.2",
"util-deprecate": "^1.0.2",
- "webpack": "^3.11.0"
+ "webpack": "^3.11.0",
+ "webpack-hot-middleware": "^2.21.0"
},
"devDependencies": {
"nodemon": "^1.15.1"
},
"peerDependencies": {
"babel-core": "^6.26.0 || ^7.0.0-0",
+ "babel-runtime": ">=6.0.0",
"react": ">=15.0.0 || ^16.0.0",
"react-dom": ">=15.0.0 || ^16.0.0"
}
diff --git a/app/react/src/server/config/webpack.config.js b/app/react/src/server/config/webpack.config.js
index 7de48c12403..2b29ad8e58a 100644
--- a/app/react/src/server/config/webpack.config.js
+++ b/app/react/src/server/config/webpack.config.js
@@ -66,10 +66,10 @@ export default function(configDir) {
test: /\.md$/,
use: [
{
- loader: 'html-loader',
+ loader: require.resolve('html-loader'),
},
{
- loader: 'markdown-loader',
+ loader: require.resolve('markdown-loader'),
},
],
},
diff --git a/app/react/src/server/config/webpack.config.prod.js b/app/react/src/server/config/webpack.config.prod.js
index 70527fac71c..120737a1514 100644
--- a/app/react/src/server/config/webpack.config.prod.js
+++ b/app/react/src/server/config/webpack.config.prod.js
@@ -77,10 +77,10 @@ export default function(configDir) {
test: /\.md$/,
use: [
{
- loader: 'html-loader',
+ loader: require.resolve('html-loader'),
},
{
- loader: 'markdown-loader',
+ loader: require.resolve('markdown-loader'),
},
],
},
diff --git a/app/vue/.babelrc b/app/vue/.babelrc
deleted file mode 100644
index 845c3cf4d75..00000000000
--- a/app/vue/.babelrc
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "presets": ["env", "stage-0", "react"]
-}
diff --git a/app/vue/package.json b/app/vue/package.json
index 6a50462e766..a815abc807d 100644
--- a/app/vue/package.json
+++ b/app/vue/package.json
@@ -23,57 +23,37 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
- "@storybook/addon-actions": "^3.4.0-alpha.9",
- "@storybook/addon-links": "^3.4.0-alpha.9",
"@storybook/addons": "^3.4.0-alpha.9",
"@storybook/channel-postmessage": "^3.4.0-alpha.9",
"@storybook/core": "^3.4.0-alpha.9",
"@storybook/ui": "^3.4.0-alpha.9",
"airbnb-js-shims": "^1.4.1",
- "autoprefixer": "^7.2.6",
"babel-loader": "^7.1.2",
"babel-plugin-macros": "^2.1.0",
- "babel-plugin-react-docgen": "^1.8.2",
"babel-plugin-transform-regenerator": "^6.26.0",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-env": "^1.6.0",
"babel-preset-minify": "^0.3.0",
- "babel-preset-react": "^6.24.1",
- "babel-preset-react-app": "^3.1.1",
"babel-preset-stage-0": "^6.24.1",
"babel-runtime": "^6.26.0",
"case-sensitive-paths-webpack-plugin": "^2.1.1",
"common-tags": "^1.7.2",
- "configstore": "^3.1.1",
"core-js": "^2.5.3",
- "css-loader": "^0.28.10",
"dotenv-webpack": "^1.5.4",
- "express": "^4.16.2",
- "file-loader": "^1.1.9",
"find-cache-dir": "^1.0.0",
"global": "^4.3.2",
"html-loader": "^0.5.5",
"html-webpack-plugin": "^2.30.1",
- "json-loader": "^0.5.7",
- "json-stringify-safe": "^5.0.1",
"json5": "^0.5.1",
"markdown-loader": "^2.0.2",
- "postcss-flexbugs-fixes": "^3.3.0",
- "postcss-loader": "^2.1.0",
- "prop-types": "^15.6.0",
- "qs": "^6.5.1",
"react": "^16.2.0",
"react-dev-utils": "^5.0.0",
"react-dom": "^16.2.0",
"redux": "^3.7.2",
- "request": "^2.83.0",
- "style-loader": "^0.20.2",
"uglifyjs-webpack-plugin": "^1.2.2",
- "url-loader": "^0.6.2",
"util-deprecate": "^1.0.2",
- "vue-hot-reload-api": "^2.3.0",
- "vue-style-loader": "^3.1.2",
- "webpack": "^3.11.0"
+ "webpack": "^3.11.0",
+ "webpack-hot-middleware": "^2.21.0"
},
"devDependencies": {
"nodemon": "^1.15.1",
@@ -83,6 +63,7 @@
},
"peerDependencies": {
"babel-core": "^6.26.0 || ^7.0.0-0",
+ "babel-runtime": ">=6.0.0",
"vue": ">=2.0.0",
"vue-loader": ">=13.0.0",
"vue-template-compiler": ">=2.0.0"
diff --git a/app/vue/src/server/addons.js b/app/vue/src/server/addons.js
deleted file mode 100644
index 280e2ac1365..00000000000
--- a/app/vue/src/server/addons.js
+++ /dev/null
@@ -1,2 +0,0 @@
-// import '@storybook/addon-actions/register';
-// import '@storybook/addon-links/register';
diff --git a/app/vue/src/server/babel_config.js b/app/vue/src/server/babel_config.js
index 8eab74ed428..5f9184d1d87 100644
--- a/app/vue/src/server/babel_config.js
+++ b/app/vue/src/server/babel_config.js
@@ -65,20 +65,5 @@ export default function(configDir) {
}
}
- const finalConfig = babelConfig || defaultConfig;
- // Ensure plugins are defined or fallback to an array to avoid empty values.
- const babelConfigPlugins = finalConfig.plugins || [];
- const extraPlugins = [
- [
- require.resolve('babel-plugin-react-docgen'),
- {
- DOC_GEN_COLLECTION_NAME: 'STORYBOOK_REACT_CLASSES',
- },
- ],
- ];
- // If `babelConfigPlugins` is not an `Array`, calling `concat` will inject it
- // as a single value, if it is an `Array` it will be spreaded.
- finalConfig.plugins = [].concat(babelConfigPlugins, extraPlugins);
-
- return finalConfig;
+ return babelConfig || defaultConfig;
}
diff --git a/app/vue/src/server/babel_config.test.js b/app/vue/src/server/babel_config.test.js
deleted file mode 100644
index ba991adcd4e..00000000000
--- a/app/vue/src/server/babel_config.test.js
+++ /dev/null
@@ -1,110 +0,0 @@
-import loadBabelConfig from './babel_config';
-
-// eslint-disable-next-line global-require
-jest.mock('fs', () => require('../../../../__mocks__/fs'));
-jest.mock('path', () => ({
- resolve: () => '.babelrc',
-}));
-
-const setup = ({ files }) => {
- // eslint-disable-next-line no-underscore-dangle, global-require
- require('fs').__setMockFiles(files);
-};
-
-describe('babel_config', () => {
- // As the 'fs' is going to be mocked, let's call require.resolve
- // so the require.cache has the correct route to the file.
- // In fact let's use it in the tests :)
- const babelPluginReactDocgenPath = require.resolve('babel-plugin-react-docgen');
-
- it('should return the config with the extra plugins when `plugins` is an array.', () => {
- setup({
- files: {
- '.babelrc': `{
- "presets": [
- "env",
- "foo-preset"
- ],
- "plugins": [
- "foo-plugin"
- ]
- }`,
- },
- });
-
- const config = loadBabelConfig('.foo');
-
- expect(config).toEqual({
- babelrc: false,
- plugins: [
- 'foo-plugin',
- [
- babelPluginReactDocgenPath,
- {
- DOC_GEN_COLLECTION_NAME: 'STORYBOOK_REACT_CLASSES',
- },
- ],
- ],
- presets: ['env', 'foo-preset'],
- });
- });
-
- it('should return the config with the extra plugins when `plugins` is not an array.', () => {
- setup({
- files: {
- '.babelrc': `{
- "presets": [
- "env",
- "foo-preset"
- ],
- "plugins": "bar-plugin"
- }`,
- },
- });
-
- const config = loadBabelConfig('.bar');
-
- expect(config).toEqual({
- babelrc: false,
- plugins: [
- 'bar-plugin',
- [
- babelPluginReactDocgenPath,
- {
- DOC_GEN_COLLECTION_NAME: 'STORYBOOK_REACT_CLASSES',
- },
- ],
- ],
- presets: ['env', 'foo-preset'],
- });
- });
-
- it('should return the config only with the extra plugins when `plugins` is not present.', () => {
- // Mock a `.babelrc` config file with no plugins key.
- setup({
- files: {
- '.babelrc': `{
- "presets": [
- "env",
- "foo-preset"
- ]
- }`,
- },
- });
-
- const config = loadBabelConfig('.biz');
-
- expect(config).toEqual({
- babelrc: false,
- plugins: [
- [
- babelPluginReactDocgenPath,
- {
- DOC_GEN_COLLECTION_NAME: 'STORYBOOK_REACT_CLASSES',
- },
- ],
- ],
- presets: ['env', 'foo-preset'],
- });
- });
-});
diff --git a/app/vue/src/server/config.js b/app/vue/src/server/config.js
index 1ef00345b3c..f326c4e5579 100644
--- a/app/vue/src/server/config.js
+++ b/app/vue/src/server/config.js
@@ -35,13 +35,10 @@ export default function(configType, baseConfig, configDir) {
// Check whether addons.js file exists inside the storybook.
// Load the default addons.js file if it's missing.
// Insert it after polyfills.js, but before client/manager.
- const storybookDefaultAddonsPath = path.resolve(__dirname, 'addons.js');
const storybookCustomAddonsPath = path.resolve(configDir, 'addons.js');
if (fs.existsSync(storybookCustomAddonsPath)) {
logger.info('=> Loading custom addons config.');
config.entry.manager.splice(1, 0, storybookCustomAddonsPath);
- } else {
- config.entry.manager.splice(1, 0, storybookDefaultAddonsPath);
}
const defaultConfig = createDefaultWebpackConfig(config);
diff --git a/app/vue/src/server/config/babel.js b/app/vue/src/server/config/babel.js
index 0ce366ebe9a..77a413a7cb4 100644
--- a/app/vue/src/server/config/babel.js
+++ b/app/vue/src/server/config/babel.js
@@ -12,7 +12,6 @@ module.exports = {
},
],
require.resolve('babel-preset-stage-0'),
- require.resolve('babel-preset-react'),
],
plugins: [
require.resolve('babel-plugin-macros'),
diff --git a/app/vue/src/server/config/babel.prod.js b/app/vue/src/server/config/babel.prod.js
index 59a87fe49bc..0418f1a1dc3 100644
--- a/app/vue/src/server/config/babel.prod.js
+++ b/app/vue/src/server/config/babel.prod.js
@@ -12,7 +12,6 @@ module.exports = {
},
],
require.resolve('babel-preset-stage-0'),
- require.resolve('babel-preset-react'),
require.resolve('babel-preset-minify'),
],
plugins: [
diff --git a/app/vue/src/server/config/webpack.config.js b/app/vue/src/server/config/webpack.config.js
index f98a9b25e4c..b06d1ffc136 100644
--- a/app/vue/src/server/config/webpack.config.js
+++ b/app/vue/src/server/config/webpack.config.js
@@ -71,10 +71,10 @@ export default function(configDir) {
test: /\.md$/,
use: [
{
- loader: 'html-loader',
+ loader: require.resolve('html-loader'),
},
{
- loader: 'markdown-loader',
+ loader: require.resolve('markdown-loader'),
},
],
},
@@ -89,8 +89,6 @@ export default function(configDir) {
modules: ['node_modules'].concat(nodePaths),
alias: {
vue$: require.resolve('vue/dist/vue.esm.js'),
- react$: require.resolve('react'),
- 'react-dom$': require.resolve('react-dom'),
},
},
performance: {
diff --git a/app/vue/src/server/config/webpack.config.prod.js b/app/vue/src/server/config/webpack.config.prod.js
index 895ab3ad31d..40091d93f19 100644
--- a/app/vue/src/server/config/webpack.config.prod.js
+++ b/app/vue/src/server/config/webpack.config.prod.js
@@ -82,10 +82,10 @@ export default function(configDir) {
test: /\.md$/,
use: [
{
- loader: 'html-loader',
+ loader: require.resolve('html-loader'),
},
{
- loader: 'markdown-loader',
+ loader: require.resolve('markdown-loader'),
},
],
},
@@ -100,8 +100,6 @@ export default function(configDir) {
modules: ['node_modules'].concat(nodePaths),
alias: {
vue$: require.resolve('vue/dist/vue.esm.js'),
- react$: require.resolve('react'),
- 'react-dom$': require.resolve('react-dom'),
},
},
};
diff --git a/docs/package.json b/docs/package.json
index 4f3b890cf64..fa5345c8edc 100644
--- a/docs/package.json
+++ b/docs/package.json
@@ -22,23 +22,16 @@
"@storybook/addon-links": "^3.3.14",
"@storybook/addons": "^3.3.14",
"@storybook/react": "^3.3.14",
- "babel-cli": "^6.26.0",
- "babel-core": "^6.26.0",
"babel-loader": "^6.4.1",
- "babel-plugin-transform-runtime": "^6.23.0",
- "babel-polyfill": "^6.26.0",
- "babel-preset-env": "^1.6.1",
- "babel-preset-react": "^6.24.1",
- "babel-preset-stage-0": "^6.24.1",
"bootstrap": "^3.3.7",
- "gatsby": "^1.9.209",
+ "gatsby": "^1.9.212",
"gatsby-link": "^1.6.37",
- "gatsby-plugin-sharp": "^1.6.33",
+ "gatsby-plugin-sharp": "^1.6.34",
"gatsby-remark-autolink-headers": "^1.4.12",
"gatsby-remark-copy-linked-files": "^1.5.28",
- "gatsby-remark-images": "^1.5.49",
+ "gatsby-remark-images": "^1.5.50",
"gatsby-remark-smartypants": "^1.4.11",
- "gatsby-source-filesystem": "^1.5.22",
+ "gatsby-source-filesystem": "^1.5.23",
"gatsby-transformer-remark": "^1.7.33",
"gh-pages": "^1.1.0",
"global": "^4.3.2",
diff --git a/docs/yarn.lock b/docs/yarn.lock
index 27eee6350b6..c27ffeaf99f 100644
--- a/docs/yarn.lock
+++ b/docs/yarn.lock
@@ -4410,9 +4410,9 @@ gatsby-module-loader@^1.0.10:
babel-runtime "^6.26.0"
loader-utils "^0.2.16"
-gatsby-plugin-sharp@^1.6.33:
- version "1.6.33"
- resolved "https://registry.yarnpkg.com/gatsby-plugin-sharp/-/gatsby-plugin-sharp-1.6.33.tgz#05044062f59232567bd8a3f8e8d5e199d210409d"
+gatsby-plugin-sharp@^1.6.34:
+ version "1.6.34"
+ resolved "https://registry.yarnpkg.com/gatsby-plugin-sharp/-/gatsby-plugin-sharp-1.6.34.tgz#11cd60af3d3a9c8e77772476ba200830f7e71eb6"
dependencies:
async "^2.1.2"
babel-runtime "^6.26.0"
@@ -4457,13 +4457,13 @@ gatsby-remark-copy-linked-files@^1.5.28:
probe-image-size "^3.2.0"
unist-util-visit "^1.1.1"
-gatsby-remark-images@^1.5.49:
- version "1.5.49"
- resolved "https://registry.yarnpkg.com/gatsby-remark-images/-/gatsby-remark-images-1.5.49.tgz#05dd1d17ea268cd043b5d0ee17ca5a286a4ef43d"
+gatsby-remark-images@^1.5.50:
+ version "1.5.50"
+ resolved "https://registry.yarnpkg.com/gatsby-remark-images/-/gatsby-remark-images-1.5.50.tgz#695022db8f84385782afbb57bc57c36572367469"
dependencies:
babel-runtime "^6.26.0"
cheerio "^1.0.0-rc.2"
- gatsby-plugin-sharp "^1.6.33"
+ gatsby-plugin-sharp "^1.6.34"
is-relative-url "^2.0.0"
lodash "^4.17.4"
slash "^1.0.0"
@@ -4478,9 +4478,9 @@ gatsby-remark-smartypants@^1.4.11:
retext-smartypants "^2.0.0"
unist-util-visit "^1.1.1"
-gatsby-source-filesystem@^1.5.22:
- version "1.5.22"
- resolved "https://registry.yarnpkg.com/gatsby-source-filesystem/-/gatsby-source-filesystem-1.5.22.tgz#5017b2c8714301a04ae30be700c0f71be8661451"
+gatsby-source-filesystem@^1.5.23:
+ version "1.5.23"
+ resolved "https://registry.yarnpkg.com/gatsby-source-filesystem/-/gatsby-source-filesystem-1.5.23.tgz#a48432f6db6c2c702f06cb87d720e8d281c4a73b"
dependencies:
babel-cli "^6.26.0"
babel-runtime "^6.26.0"
@@ -4519,9 +4519,9 @@ gatsby-transformer-remark@^1.7.33:
unist-util-select "^1.5.0"
unist-util-visit "^1.1.1"
-gatsby@^1.9.209:
- version "1.9.209"
- resolved "https://registry.yarnpkg.com/gatsby/-/gatsby-1.9.209.tgz#c9b60e41dbf637533ca215e9c32f3354c2603d8f"
+gatsby@^1.9.212:
+ version "1.9.212"
+ resolved "https://registry.yarnpkg.com/gatsby/-/gatsby-1.9.212.tgz#b3b42bb2ebc75ba2d90c86a39f1a090e2f05ecec"
dependencies:
async "^2.1.2"
babel-code-frame "^6.22.0"
diff --git a/examples/angular-cli/e2e/app.po.ts b/examples/angular-cli/e2e/app.po.ts
index 82ea75ba504..eb663398fd5 100644
--- a/examples/angular-cli/e2e/app.po.ts
+++ b/examples/angular-cli/e2e/app.po.ts
@@ -6,6 +6,6 @@ export class AppPage {
}
getParagraphText() {
- return element(by.css('app-root h1')).getText();
+ return element(by.css('storybook-app-root h1')).getText();
}
}
diff --git a/examples/angular-cli/karma.conf.js b/examples/angular-cli/karma.conf.js
index 51fd7c6b7ee..684edc0f86f 100644
--- a/examples/angular-cli/karma.conf.js
+++ b/examples/angular-cli/karma.conf.js
@@ -30,5 +30,6 @@ module.exports = function(config) {
autoWatch: true,
browsers: ['Chrome'],
singleRun: false,
+ webpack: { node: { fs: 'empty', } },
});
};
diff --git a/examples/angular-cli/package.json b/examples/angular-cli/package.json
index 6517eb2fcb5..31637584ce9 100644
--- a/examples/angular-cli/package.json
+++ b/examples/angular-cli/package.json
@@ -13,15 +13,12 @@
"test": "ng test"
},
"dependencies": {
- "@angular/animations": "^5.2.6",
"@angular/common": "^5.2.6",
"@angular/compiler": "^5.2.6",
"@angular/core": "^5.2.6",
"@angular/forms": "^5.2.6",
- "@angular/http": "^5.2.6",
"@angular/platform-browser": "^5.2.6",
"@angular/platform-browser-dynamic": "^5.2.6",
- "@angular/router": "^5.2.6",
"core-js": "^2.4.1",
"rxjs": "^5.4.2",
"zone.js": "^0.8.20"
@@ -29,7 +26,6 @@
"devDependencies": {
"@angular/cli": "1.7.1",
"@angular/compiler-cli": "^5.2.6",
- "@angular/language-service": "^5.2.6",
"@storybook/addon-actions": "^3.4.0-alpha.9",
"@storybook/addon-knobs": "^3.4.0-alpha.9",
"@storybook/addon-links": "^3.4.0-alpha.9",
diff --git a/examples/angular-cli/src/index.html b/examples/angular-cli/src/index.html
index 6834dc51f52..4d9441d0f32 100644
--- a/examples/angular-cli/src/index.html
+++ b/examples/angular-cli/src/index.html
@@ -9,6 +9,6 @@
-
+