@storybook/react 3.4.2 → 3.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
|
|
7
|
-
exports.default = function (configDir) {
|
|
7
|
+
exports.default = function (configDir, quiet) {
|
|
8
8
|
var config = {
|
|
9
9
|
devtool: 'cheap-module-source-map',
|
|
10
10
|
entry: {
|
|
@@ -31,7 +31,7 @@ exports.default = function (configDir) {
|
|
|
31
31
|
previewHead: (0, _utils2.getPreviewHeadHtml)(configDir)
|
|
32
32
|
},
|
|
33
33
|
template: require.resolve('../iframe.html.ejs')
|
|
34
|
-
}), new _webpack2.default.DefinePlugin((0, _utils.loadEnv)()), new _webpack2.default.HotModuleReplacementPlugin(), new _caseSensitivePathsWebpackPlugin2.default(), new _WatchMissingNodeModulesPlugin2.default(_utils.nodeModulesPaths), new _webpack2.default.ProgressPlugin(), new _dotenvWebpack2.default({ silent: true })],
|
|
34
|
+
}), new _webpack2.default.DefinePlugin((0, _utils.loadEnv)()), new _webpack2.default.HotModuleReplacementPlugin(), new _caseSensitivePathsWebpackPlugin2.default(), new _WatchMissingNodeModulesPlugin2.default(_utils.nodeModulesPaths), quiet ? null : new _webpack2.default.ProgressPlugin(), new _dotenvWebpack2.default({ silent: true })].filter(Boolean),
|
|
35
35
|
module: {
|
|
36
36
|
rules: [{
|
|
37
37
|
test: /\.jsx?$/,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
2
|
<html>
|
|
3
|
+
|
|
3
4
|
<head>
|
|
4
5
|
<meta charset="utf-8">
|
|
5
6
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
@@ -7,14 +8,20 @@
|
|
|
7
8
|
<base target="_parent">
|
|
8
9
|
<script>
|
|
9
10
|
if (window.parent !== window) {
|
|
10
|
-
|
|
11
|
+
try {
|
|
12
|
+
window.__REACT_DEVTOOLS_GLOBAL_HOOK__ = window.parent.__REACT_DEVTOOLS_GLOBAL_HOOK__;
|
|
13
|
+
} catch (error) {
|
|
14
|
+
// The above line can throw if we do not have access to the parent frame -- i.e. cross origin
|
|
15
|
+
}
|
|
11
16
|
}
|
|
12
17
|
</script>
|
|
13
18
|
<title>Storybook</title>
|
|
14
19
|
<%= htmlWebpackPlugin.options.data.previewHead %>
|
|
15
20
|
</head>
|
|
21
|
+
|
|
16
22
|
<body>
|
|
17
|
-
<div id="root"></div>
|
|
18
|
-
<div id="error-display"></div>
|
|
23
|
+
<div id="root"></div>
|
|
24
|
+
<div id="error-display"></div>
|
|
19
25
|
</body>
|
|
20
|
-
|
|
26
|
+
|
|
27
|
+
</html>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/react",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.6",
|
|
4
4
|
"description": "Storybook for React: Develop React Component in isolation with Hot Reloading.",
|
|
5
5
|
"homepage": "https://github.com/storybooks/storybook/tree/master/app/react",
|
|
6
6
|
"bugs": {
|
|
@@ -23,14 +23,14 @@
|
|
|
23
23
|
"prepare": "node ../../scripts/prepare.js"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@storybook/addon-actions": "3.4.
|
|
27
|
-
"@storybook/addon-links": "3.4.
|
|
28
|
-
"@storybook/addons": "3.4.
|
|
29
|
-
"@storybook/channel-postmessage": "3.4.
|
|
30
|
-
"@storybook/client-logger": "3.4.
|
|
31
|
-
"@storybook/core": "3.4.
|
|
32
|
-
"@storybook/node-logger": "3.4.
|
|
33
|
-
"@storybook/ui": "3.4.
|
|
26
|
+
"@storybook/addon-actions": "3.4.6",
|
|
27
|
+
"@storybook/addon-links": "3.4.6",
|
|
28
|
+
"@storybook/addons": "3.4.6",
|
|
29
|
+
"@storybook/channel-postmessage": "3.4.6",
|
|
30
|
+
"@storybook/client-logger": "3.4.6",
|
|
31
|
+
"@storybook/core": "3.4.6",
|
|
32
|
+
"@storybook/node-logger": "3.4.6",
|
|
33
|
+
"@storybook/ui": "3.4.6",
|
|
34
34
|
"airbnb-js-shims": "^1.4.1",
|
|
35
35
|
"babel-loader": "^7.1.4",
|
|
36
36
|
"babel-plugin-macros": "^2.2.0",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"uglifyjs-webpack-plugin": "^1.2.4",
|
|
62
62
|
"util-deprecate": "^1.0.2",
|
|
63
63
|
"webpack": "^3.11.0",
|
|
64
|
-
"webpack-hot-middleware": "^2.
|
|
64
|
+
"webpack-hot-middleware": "^2.22.1"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
67
|
"nodemon": "^1.17.2"
|
|
@@ -12,7 +12,7 @@ import babelLoaderConfig from './babel';
|
|
|
12
12
|
import { getPreviewHeadHtml, getManagerHeadHtml } from '../utils';
|
|
13
13
|
import { version } from '../../../package.json';
|
|
14
14
|
|
|
15
|
-
export default function(configDir) {
|
|
15
|
+
export default function(configDir, quiet) {
|
|
16
16
|
const config = {
|
|
17
17
|
devtool: 'cheap-module-source-map',
|
|
18
18
|
entry: {
|
|
@@ -51,9 +51,9 @@ export default function(configDir) {
|
|
|
51
51
|
new webpack.HotModuleReplacementPlugin(),
|
|
52
52
|
new CaseSensitivePathsPlugin(),
|
|
53
53
|
new WatchMissingNodeModulesPlugin(nodeModulesPaths),
|
|
54
|
-
new webpack.ProgressPlugin(),
|
|
54
|
+
quiet ? null : new webpack.ProgressPlugin(),
|
|
55
55
|
new Dotenv({ silent: true }),
|
|
56
|
-
],
|
|
56
|
+
].filter(Boolean),
|
|
57
57
|
module: {
|
|
58
58
|
rules: [
|
|
59
59
|
{
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
2
|
<html>
|
|
3
|
+
|
|
3
4
|
<head>
|
|
4
5
|
<meta charset="utf-8">
|
|
5
6
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
@@ -7,14 +8,20 @@
|
|
|
7
8
|
<base target="_parent">
|
|
8
9
|
<script>
|
|
9
10
|
if (window.parent !== window) {
|
|
10
|
-
|
|
11
|
+
try {
|
|
12
|
+
window.__REACT_DEVTOOLS_GLOBAL_HOOK__ = window.parent.__REACT_DEVTOOLS_GLOBAL_HOOK__;
|
|
13
|
+
} catch (error) {
|
|
14
|
+
// The above line can throw if we do not have access to the parent frame -- i.e. cross origin
|
|
15
|
+
}
|
|
11
16
|
}
|
|
12
17
|
</script>
|
|
13
18
|
<title>Storybook</title>
|
|
14
19
|
<%= htmlWebpackPlugin.options.data.previewHead %>
|
|
15
20
|
</head>
|
|
21
|
+
|
|
16
22
|
<body>
|
|
17
|
-
<div id="root"></div>
|
|
18
|
-
<div id="error-display"></div>
|
|
23
|
+
<div id="root"></div>
|
|
24
|
+
<div id="error-display"></div>
|
|
19
25
|
</body>
|
|
20
|
-
|
|
26
|
+
|
|
27
|
+
</html>
|