Skip to content

Commit

Permalink
Merge pull request #240 from kadirahq/fix-path-join
Browse files Browse the repository at this point in the history
Fix path on Windows
  • Loading branch information
Muhammed Thanish committed Jun 7, 2016
2 parents f6bec8d + e8a1ee9 commit 1e6f1be
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
Empty file modified dist/server/build.js
100755 → 100644
Empty file.
6 changes: 3 additions & 3 deletions dist/server/iframe.html.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ Object.defineProperty(exports, "__esModule", {
});

exports.default = function (headHtml, publicPath) {
return '\n <!DOCTYPE html>\n <html>\n <head>\n <meta charset="utf-8">\n <meta name="viewport" content="width=device-width, initial-scale=1">\n <script>\n if (window.parent !== window) {\n window.__REACT_DEVTOOLS_GLOBAL_HOOK__ = window.parent.__REACT_DEVTOOLS_GLOBAL_HOOK__;\n }\n </script>\n <title>React Storybook</title>\n ' + headHtml + '\n </head>\n <body>\n <div id="root"></div>\n <script src="' + _path2.default.join(publicPath, 'preview.bundle.js') + '"></script>\n </body>\n </html>\n ';
return '\n <!DOCTYPE html>\n <html>\n <head>\n <meta charset="utf-8">\n <meta name="viewport" content="width=device-width, initial-scale=1">\n <script>\n if (window.parent !== window) {\n window.__REACT_DEVTOOLS_GLOBAL_HOOK__ = window.parent.__REACT_DEVTOOLS_GLOBAL_HOOK__;\n }\n </script>\n <title>React Storybook</title>\n ' + headHtml + '\n </head>\n <body>\n <div id="root"></div>\n <script src="' + _url2.default.resolve(publicPath, 'preview.bundle.js') + '"></script>\n </body>\n </html>\n ';
};

var _path = require('path');
var _url = require('url');

var _path2 = _interopRequireDefault(_path);
var _url2 = _interopRequireDefault(_url);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
6 changes: 3 additions & 3 deletions dist/server/index.html.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ Object.defineProperty(exports, "__esModule", {
});

exports.default = function (publicPath) {
return '\n <!DOCTYPE html>\n <html>\n <head>\n <meta charset="utf-8">\n <meta name="viewport" content="width=device-width, initial-scale=1">\n <title>React Storybook</title>\n <style>\n /*\n When resizing panels, the drag event breaks if the cursor\n moves over the iframe. Add the \'dragging\' class to the body\n at drag start and remove it when the drag ends.\n */\n .dragging iframe {\n pointer-events: none;\n }\n\n /* Styling the fuzzy search box placeholders */\n .searchBox::-webkit-input-placeholder { /* Chrome/Opera/Safari */\n color: #ddd;\n font-size: 16px;\n }\n\n .searchBox::-moz-placeholder { /* Firefox 19+ */\n color: #ddd;\n font-size: 16px;\n }\n\n .searchBox:focus{\n border-color: #EEE !important;\n }\n\n .btn:hover{\n background-color: #eee\n }\n </style>\n </head>\n <body style="margin: 0;">\n <div id="root"></div>\n <script src="' + _path2.default.join(publicPath, 'manager.bundle.js') + '"></script>\n </body>\n </html>\n ';
return '\n <!DOCTYPE html>\n <html>\n <head>\n <meta charset="utf-8">\n <meta name="viewport" content="width=device-width, initial-scale=1">\n <title>React Storybook</title>\n <style>\n /*\n When resizing panels, the drag event breaks if the cursor\n moves over the iframe. Add the \'dragging\' class to the body\n at drag start and remove it when the drag ends.\n */\n .dragging iframe {\n pointer-events: none;\n }\n\n /* Styling the fuzzy search box placeholders */\n .searchBox::-webkit-input-placeholder { /* Chrome/Opera/Safari */\n color: #ddd;\n font-size: 16px;\n }\n\n .searchBox::-moz-placeholder { /* Firefox 19+ */\n color: #ddd;\n font-size: 16px;\n }\n\n .searchBox:focus{\n border-color: #EEE !important;\n }\n\n .btn:hover{\n background-color: #eee\n }\n </style>\n </head>\n <body style="margin: 0;">\n <div id="root"></div>\n <script src="' + _url2.default.resolve(publicPath, 'manager.bundle.js') + '"></script>\n </body>\n </html>\n ';
};

var _path = require('path');
var _url = require('url');

var _path2 = _interopRequireDefault(_path);
var _url2 = _interopRequireDefault(_url);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
4 changes: 2 additions & 2 deletions src/server/iframe.html.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import path from 'path';
import url from 'url';

export default function (headHtml, publicPath) {
return `
Expand All @@ -17,7 +17,7 @@ export default function (headHtml, publicPath) {
</head>
<body>
<div id="root"></div>
<script src="${path.join(publicPath, 'preview.bundle.js')}"></script>
<script src="${url.resolve(publicPath, 'preview.bundle.js')}"></script>
</body>
</html>
`;
Expand Down
4 changes: 2 additions & 2 deletions src/server/index.html.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import path from 'path';
import url from 'url';

export default function (publicPath) {
return `
Expand Down Expand Up @@ -40,7 +40,7 @@ export default function (publicPath) {
</head>
<body style="margin: 0;">
<div id="root"></div>
<script src="${path.join(publicPath, 'manager.bundle.js')}"></script>
<script src="${url.resolve(publicPath, 'manager.bundle.js')}"></script>
</body>
</html>
`;
Expand Down

0 comments on commit 1e6f1be

Please sign in to comment.