Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move polymer loader to peerDependencies #3161

Merged
merged 2 commits into from
Mar 8, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions app/polymer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
"global": "^4.3.2",
"html-webpack-plugin": "^2.30.1",
"json5": "^0.5.1",
"polymer-webpack-loader": "2.0.1",
"react": "^16.0.0",
"react-dev-utils": "^5.0.0",
"react-dom": "^16.0.0",
Expand All @@ -59,10 +58,12 @@
"webpack-hot-middleware": "^2.21.2"
},
"devDependencies": {
"nodemon": "^1.17.1"
"nodemon": "^1.17.1",
"polymer-webpack-loader": "^2.0.1"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure that we need this dependency still, but perhaps I'm missing something here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! that doesn't sounds like a blocker tbh

},
"peerDependencies": {
"babel-core": "^6.26.0 || ^7.0.0-0",
"babel-runtime": ">=6.0.0"
"babel-runtime": ">=6.0.0",
"polymer-webpack-loader": ">=2.0.0"
}
}
2 changes: 1 addition & 1 deletion examples/polymer-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@storybook/polymer": "^3.4.0-rc.0",
"@webcomponents/webcomponentsjs": "^1.1.0",
"global": "^4.3.2",
"polymer-webpack-loader": "^2.0.0",
"polymer-webpack-loader": "^2.0.1",
"webpack": "^3.11.0"
},
"devDependencies": {
Expand Down
16 changes: 14 additions & 2 deletions lib/cli/generators/POLYMER/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,16 @@ import path from 'path';
import { getVersions, getPackageJson, writePackageJson } from '../../lib/helpers';

export default async () => {
const [storybookVersion, babelCoreVersion, babelRuntimeVersion] = await getVersions(
const [
storybookVersion,
babelCoreVersion,
babelRuntimeVersion,
polymerLoaderVarion,
] = await getVersions(
'@storybook/polymer',
'babel-core',
'babel-runtime'
'babel-runtime',
'polymer-webpack-loader'
);
mergeDirs(path.resolve(__dirname, 'template'), '.', 'overwrite');

Expand All @@ -22,6 +28,12 @@ export default async () => {
if (!packageJson.dependencies['babel-runtime'] && !packageJson.devDependencies['babel-runtime']) {
packageJson.devDependencies['babel-runtime'] = babelRuntimeVersion;
}
if (
!packageJson.dependencies['polymer-webpack-loader'] &&
!packageJson.devDependencies['polymer-webpack-loader']
) {
packageJson.devDependencies['polymer-webpack-loader'] = polymerLoaderVarion;
}

packageJson.scripts = packageJson.scripts || {};
packageJson.scripts.storybook = 'start-storybook -p 6006';
Expand Down
3 changes: 2 additions & 1 deletion lib/cli/test/snapshots/polymer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"devDependencies": {
"@storybook/polymer": "^3.4.0-rc.0",
"babel-core": "^6.26.0",
"babel-runtime": "^6.26.0"
"babel-runtime": "^6.26.0",
"polymer-webpack-loader": "^2.0.1"
}
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
"lint-staged": "^7.0.0",
"lodash": "^4.17.5",
"npmlog": "^4.1.2",
"polymer-webpack-loader": "^2.0.1",
"prettier": "^1.11.1",
"raf": "^3.4.0",
"react": "^16.2.0",
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11703,7 +11703,7 @@ pngjs@^3.0.0, pngjs@^3.3.0:
version "3.3.1"
resolved "https://registry.yarnpkg.com/pngjs/-/pngjs-3.3.1.tgz#8e14e6679ee7424b544334c3b2d21cea6d8c209a"

polymer-webpack-loader@2.0.1, polymer-webpack-loader@^2.0.0:
polymer-webpack-loader@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/polymer-webpack-loader/-/polymer-webpack-loader-2.0.1.tgz#d15d45328f6a6700366dfaee83fc606f39cdcee0"
dependencies:
Expand Down