Move polymer loader to peerDependencies

This commit is contained in:
Hypnosphi 2018-03-07 03:20:54 +03:00
parent 94df787b99
commit cedf0604c7
6 changed files with 23 additions and 8 deletions

View File

@ -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",
@ -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"
},
"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"
}
}

View File

@ -19,7 +19,7 @@
"@storybook/polymer": "^3.4.0-alpha.9",
"@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": {

View File

@ -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');
@ -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';

View File

@ -14,6 +14,7 @@
"devDependencies": {
"@storybook/polymer": "^3.4.0-alpha.9",
"babel-core": "^6.26.0",
"babel-runtime": "^6.26.0"
"babel-runtime": "^6.26.0",
"polymer-webpack-loader": "^2.0.1"
}
}

View File

@ -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",

View File

@ -11699,7 +11699,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: