Skip to content

Commit

Permalink
Merge branch 'add-polymer-support' of github.com:storybooks/storybook…
Browse files Browse the repository at this point in the history
… into add-polymer-support
  • Loading branch information
tvs committed Nov 3, 2017
2 parents 47131c4 + ead9750 commit 64bd0fa
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 9 deletions.
2 changes: 1 addition & 1 deletion app/polymer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ With it, you can visualize different states of your UI components and develop th

> Storybook for Polymer is at the **EXPERIMENTAL** stage!
![Storybook Screenshot](https://github.com/storybooks/storybook/blob/master/app/vue/docs/demo.gif)
![Storybook Screenshot](https://github.com/storybooks/storybook/blob/master/app/polymer/docs/demo.gif)

Storybook runs outside of your app.
So you can develop UI components in isolation without worrying about app specific dependencies and requirements.
Expand Down
2 changes: 1 addition & 1 deletion app/polymer/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@storybook/polymer",
"version": "3.3.0-alpha.2",
"description": "Storybook for Polymer: Develop Vue Component in isolation with Hot Reloading.",
"description": "Storybook for Polymer: Develop Polymer Component in isolation with Hot Reloading.",
"homepage": "https://github.com/storybooks/storybook/tree/master/apps/polymer",
"bugs": {
"url": "https://github.com/storybooks/storybook/issues"
Expand Down
2 changes: 1 addition & 1 deletion app/polymer/src/server/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export default function(configType, baseConfig, configDir) {
const customConfigPath = path.resolve(configDir, 'webpack.config.js');

if (!fs.existsSync(customConfigPath)) {
logger.info('=> Using default webpack setup based on "vue-cli".');
logger.info('=> Using default webpack setup based on "polymer-cli".');
const configPath = path.resolve(__dirname, './config/defaults/webpack.config.js');
const customConfig = require(configPath);

Expand Down
2 changes: 1 addition & 1 deletion app/polymer/src/server/config/globals.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* globals window */

window.STORYBOOK_REACT_CLASSES = {};
window.STORYBOOK_ENV = 'vue';
window.STORYBOOK_ENV = 'polymer';
1 change: 0 additions & 1 deletion app/polymer/src/server/config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ export default function() {
// Based on this CRA feature: https://github.com/facebookincubator/create-react-app/issues/253
modules: ['node_modules'].concat(nodePaths),
alias: {
vue$: require.resolve('vue/dist/vue.esm.js'),
react$: require.resolve('react'),
'react-dom$': require.resolve('react-dom'),
},
Expand Down
16 changes: 12 additions & 4 deletions app/polymer/src/server/config/webpack.config.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,18 @@ export default function() {
exclude: excludePaths,
},
{
test: /\.vue$/,
loader: require.resolve('vue-loader'),
options: {},
test: /\.html$/,
exclude: /node_modules\/(?!(polymer-redux|polymer-webpack-loader)\/).*/,
use: [
{
loader: require.resolve('babel-loader'),
options: { cacheDirectory: '.babel-cache' },
},
{
loader: require.resolve('polymer-webpack-loader'),
options: { processStyleLinks: true },
},
],
},
],
},
Expand All @@ -80,7 +89,6 @@ export default function() {
// Based on this CRA feature: https://github.com/facebookincubator/create-react-app/issues/253
modules: ['node_modules'].concat(nodePaths),
alias: {
vue$: require.resolve('vue/dist/vue.esm.js'),
react$: require.resolve('react'),
'react-dom$': require.resolve('react-dom'),
},
Expand Down

0 comments on commit 64bd0fa

Please sign in to comment.