mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-03 05:04:51 +08:00
Update CLI
This commit is contained in:
parent
720bb2372d
commit
e496dfbb91
@ -41,6 +41,7 @@
|
||||
"@angular/core": ">=6.0.0",
|
||||
"@angular/forms": ">=6.0.0",
|
||||
"@angular/platform-browser": ">=6.0.0",
|
||||
"@angular/platform-browser-dynamic": ">=6.0.0"
|
||||
"@angular/platform-browser-dynamic": ">=6.0.0",
|
||||
"@babel/core": ">=7.0.0-beta.41 <8.0.0"
|
||||
}
|
||||
}
|
||||
|
@ -28,5 +28,8 @@
|
||||
"html-loader": "^0.5.5",
|
||||
"react": "^16.4.0",
|
||||
"react-dom": "^16.4.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@babel/core": ">=7.0.0-beta.41 <8.0.0"
|
||||
}
|
||||
}
|
||||
|
@ -32,6 +32,7 @@
|
||||
"react-dom": "^16.4.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@babel/core": ">=7.0.0-beta.41 <8.0.0",
|
||||
"marko": "^4.10.0",
|
||||
"marko-widgets": "^7.0.1"
|
||||
}
|
||||
|
@ -22,6 +22,7 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/plugin-transform-react-jsx": "^7.0.0-beta.51",
|
||||
"@babel/runtime": "^7.0.0-beta.51",
|
||||
"@storybook/core": "4.0.0-alpha.12",
|
||||
"common-tags": "^1.8.0",
|
||||
@ -33,6 +34,7 @@
|
||||
"mithril": "^1.1.6"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@babel/core": ">=7.0.0-beta.41 <8.0.0",
|
||||
"mithril": "^1.1.6"
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,8 @@
|
||||
import packageJson from '../../package.json';
|
||||
|
||||
import wrapDefaultBabelConfig from './wrapDefaultBabelConfig';
|
||||
|
||||
export default {
|
||||
packageJson,
|
||||
wrapDefaultBabelConfig,
|
||||
};
|
||||
|
4
app/mithril/src/server/wrapDefaultBabelConfig.js
Normal file
4
app/mithril/src/server/wrapDefaultBabelConfig.js
Normal file
@ -0,0 +1,4 @@
|
||||
export default config => ({
|
||||
...config,
|
||||
plugins: [...config.plugins, require.resolve('@babel/plugin-transform-react-jsx')],
|
||||
});
|
@ -35,6 +35,7 @@
|
||||
"polymer-webpack-loader": "^2.0.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@babel/core": ">=7.0.0-beta.41 <8.0.0",
|
||||
"lit-html": "0.10.0",
|
||||
"polymer-webpack-loader": "2.0.2"
|
||||
}
|
||||
|
@ -36,6 +36,7 @@
|
||||
"react-emotion": "^9.1.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@babel/core": ">=7.0.0-beta.41 <8.0.0",
|
||||
"react": ">=15.0.0",
|
||||
"react-dom": ">=15.0.0"
|
||||
}
|
||||
|
@ -30,11 +30,13 @@
|
||||
"react-dom": "^16.4.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-preset-vue": "^2.0.2",
|
||||
"vue": "^2.5.16",
|
||||
"vue-loader": "^14.2.3",
|
||||
"vue-template-compiler": "^2.5.16"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@babel/core": ">=7.0.0-beta.41 <8.0.0",
|
||||
"vue": "2.5.16",
|
||||
"vue-loader": "14.2.3",
|
||||
"vue-template-compiler": "2.5.16"
|
||||
|
@ -1,8 +1,10 @@
|
||||
import packageJson from '../../package.json';
|
||||
|
||||
import wrapInitialConfig from './wrapInitialConfig';
|
||||
import wrapBabelConfig from './wrapBabelConfig';
|
||||
|
||||
export default {
|
||||
packageJson,
|
||||
wrapInitialConfig,
|
||||
wrapBabelConfig,
|
||||
};
|
||||
|
4
app/vue/src/server/wrapBabelConfig.js
Normal file
4
app/vue/src/server/wrapBabelConfig.js
Normal file
@ -0,0 +1,4 @@
|
||||
export default config => ({
|
||||
...config,
|
||||
presets: [...config.presets, require.resolve('babel-preset-vue')],
|
||||
});
|
@ -1 +1 @@
|
||||
{"numFailedTestSuites":0,"numFailedTests":0,"numPassedTestSuites":2,"numPassedTests":6,"numPendingTestSuites":0,"numPendingTests":0,"numRuntimeErrorTestSuites":0,"numTotalTestSuites":2,"numTotalTests":6,"snapshot":{"added":0,"didUpdate":false,"failure":false,"filesAdded":0,"filesRemoved":0,"filesUnmatched":0,"filesUpdated":0,"matched":0,"total":0,"unchecked":0,"uncheckedKeys":[],"unmatched":0,"updated":0},"startTime":1530716718924,"success":true,"testResults":[{"assertionResults":[{"ancestorTitles":["AppComponent"],"failureMessages":[],"fullName":"AppComponent should create the app","location":null,"status":"passed","title":"should create the app"},{"ancestorTitles":["AppComponent"],"failureMessages":[],"fullName":"AppComponent should have as title 'app'","location":null,"status":"passed","title":"should have as title 'app'"},{"ancestorTitles":["AppComponent"],"failureMessages":[],"fullName":"AppComponent should render title in a h1 tag","location":null,"status":"passed","title":"should render title in a h1 tag"}],"endTime":1530716721334,"message":"","name":"/Users/jetbrains/IdeaProjects/storybook/examples/angular-cli/dist/app/app.component.spec.ts","startTime":1530716719591,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["AppComponent"],"failureMessages":[],"fullName":"AppComponent should create the app","location":null,"status":"passed","title":"should create the app"},{"ancestorTitles":["AppComponent"],"failureMessages":[],"fullName":"AppComponent should have as title 'app'","location":null,"status":"passed","title":"should have as title 'app'"},{"ancestorTitles":["AppComponent"],"failureMessages":[],"fullName":"AppComponent should render title in a h1 tag","location":null,"status":"passed","title":"should render title in a h1 tag"}],"endTime":1530716721631,"message":"","name":"/Users/jetbrains/IdeaProjects/storybook/examples/angular-cli/src/app/app.component.spec.ts","startTime":1530716721345,"status":"passed","summary":""}],"wasInterrupted":false}
|
||||
{"numFailedTestSuites":0,"numFailedTests":0,"numPassedTestSuites":2,"numPassedTests":6,"numPendingTestSuites":0,"numPendingTests":0,"numRuntimeErrorTestSuites":0,"numTotalTestSuites":2,"numTotalTests":6,"snapshot":{"added":0,"didUpdate":false,"failure":false,"filesAdded":0,"filesRemoved":0,"filesUnmatched":0,"filesUpdated":0,"matched":0,"total":0,"unchecked":0,"uncheckedKeys":[],"unmatched":0,"updated":0},"startTime":1530735099028,"success":true,"testResults":[{"assertionResults":[{"ancestorTitles":["AppComponent"],"failureMessages":[],"fullName":"AppComponent should create the app","location":null,"status":"passed","title":"should create the app"},{"ancestorTitles":["AppComponent"],"failureMessages":[],"fullName":"AppComponent should have as title 'app'","location":null,"status":"passed","title":"should have as title 'app'"},{"ancestorTitles":["AppComponent"],"failureMessages":[],"fullName":"AppComponent should render title in a h1 tag","location":null,"status":"passed","title":"should render title in a h1 tag"}],"endTime":1530735101239,"message":"","name":"/Users/jetbrains/IdeaProjects/storybook/examples/angular-cli/src/app/app.component.spec.ts","startTime":1530735099689,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["AppComponent"],"failureMessages":[],"fullName":"AppComponent should create the app","location":null,"status":"passed","title":"should create the app"},{"ancestorTitles":["AppComponent"],"failureMessages":[],"fullName":"AppComponent should have as title 'app'","location":null,"status":"passed","title":"should have as title 'app'"},{"ancestorTitles":["AppComponent"],"failureMessages":[],"fullName":"AppComponent should render title in a h1 tag","location":null,"status":"passed","title":"should render title in a h1 tag"}],"endTime":1530735101514,"message":"","name":"/Users/jetbrains/IdeaProjects/storybook/examples/angular-cli/dist/app/app.component.spec.ts","startTime":1530735101249,"status":"passed","summary":""}],"wasInterrupted":false}
|
@ -1,5 +0,0 @@
|
||||
{
|
||||
"plugins": [
|
||||
"@babel/plugin-transform-react-jsx"
|
||||
]
|
||||
}
|
@ -10,7 +10,6 @@
|
||||
"mithril": "^1.1.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/plugin-transform-react-jsx": "^7.0.0-beta.51",
|
||||
"@storybook/addon-actions": "4.0.0-alpha.12",
|
||||
"@storybook/addon-backgrounds": "4.0.0-alpha.12",
|
||||
"@storybook/addon-centered": "4.0.0-alpha.12",
|
||||
|
@ -14,7 +14,6 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.0.0-beta.51",
|
||||
"@babel/preset-env": "7.0.0-beta.51",
|
||||
"@storybook/addon-actions": "4.0.0-alpha.12",
|
||||
"@storybook/addon-backgrounds": "4.0.0-alpha.12",
|
||||
"@storybook/addon-centered": "4.0.0-alpha.12",
|
||||
@ -28,7 +27,6 @@
|
||||
"@storybook/addons": "4.0.0-alpha.12",
|
||||
"@storybook/vue": "4.0.0-alpha.12",
|
||||
"babel-loader": "^8.0.0-beta.4",
|
||||
"babel-preset-vue": "^2.0.2",
|
||||
"cross-env": "^5.1.6",
|
||||
"file-loader": "^1.1.11",
|
||||
"svg-url-loader": "^2.3.2",
|
||||
|
@ -1,6 +1,9 @@
|
||||
#!/usr/bin/env node
|
||||
const path = require('path');
|
||||
|
||||
require('@babel/register')({
|
||||
ignore: /node_modules\/(?!@storybook\/cli)/,
|
||||
// see https://github.com/babel/babel/issues/7701#issuecomment-389720069
|
||||
cwd: path.resolve(__dirname, '..'),
|
||||
only: [/(@storybook|lib)\/cli/],
|
||||
});
|
||||
require('./generate');
|
||||
|
@ -9,18 +9,23 @@ export default async npmOptions => {
|
||||
actionsVersion,
|
||||
linksVersion,
|
||||
addonsVersion,
|
||||
babelCoreVersion,
|
||||
] = await getVersions(
|
||||
npmOptions,
|
||||
'@storybook/angular',
|
||||
'@storybook/addon-notes',
|
||||
'@storybook/addon-actions',
|
||||
'@storybook/addon-links',
|
||||
'@storybook/addons'
|
||||
'@storybook/addons',
|
||||
'@babel/core'
|
||||
);
|
||||
mergeDirs(path.resolve(__dirname, 'template'), '.', 'overwrite');
|
||||
|
||||
const packageJson = getPackageJson();
|
||||
|
||||
if (!packageJson.dependencies['@babel/core'] && !packageJson.devDependencies['@babel/core']) {
|
||||
packageJson.devDependencies['@babel/core'] = babelCoreVersion;
|
||||
}
|
||||
packageJson.dependencies = packageJson.dependencies || {};
|
||||
packageJson.devDependencies = packageJson.devDependencies || {};
|
||||
packageJson.devDependencies['@storybook/angular'] = storybookVersion;
|
||||
|
@ -4,11 +4,10 @@ import npmInit from '../../lib/npm_init';
|
||||
import { getVersions, getPackageJson, writePackageJson } from '../../lib/helpers';
|
||||
|
||||
export default async npmOptions => {
|
||||
const [storybookVersion, babelCoreVersion, babelRuntimeVersion] = await getVersions(
|
||||
const [storybookVersion, babelCoreVersion] = await getVersions(
|
||||
npmOptions,
|
||||
'@storybook/html',
|
||||
'babel-core',
|
||||
'babel-runtime'
|
||||
'@babel/core'
|
||||
);
|
||||
mergeDirs(path.resolve(__dirname, 'template'), '.', 'overwrite');
|
||||
|
||||
@ -22,11 +21,8 @@ export default async npmOptions => {
|
||||
packageJson.devDependencies = packageJson.devDependencies || {};
|
||||
packageJson.devDependencies['@storybook/html'] = storybookVersion;
|
||||
|
||||
if (!packageJson.dependencies['babel-core'] && !packageJson.devDependencies['babel-core']) {
|
||||
packageJson.devDependencies['babel-core'] = babelCoreVersion;
|
||||
}
|
||||
if (!packageJson.dependencies['babel-runtime'] && !packageJson.devDependencies['babel-runtime']) {
|
||||
packageJson.devDependencies['babel-runtime'] = babelRuntimeVersion;
|
||||
if (!packageJson.dependencies['@babel/core'] && !packageJson.devDependencies['@babel/core']) {
|
||||
packageJson.devDependencies['@babel/core'] = babelCoreVersion;
|
||||
}
|
||||
|
||||
packageJson.scripts = packageJson.scripts || {};
|
||||
|
@ -8,14 +8,12 @@ export default async npmOptions => {
|
||||
addonActionVersion,
|
||||
addonKnobsVersion,
|
||||
babelCoreVersion,
|
||||
babelRuntimeVersion,
|
||||
] = await getVersions(
|
||||
npmOptions,
|
||||
'@storybook/marko',
|
||||
'@storybook/addon-actions',
|
||||
'@storybook/addon-knobs',
|
||||
'babel-core',
|
||||
'babel-runtime'
|
||||
'@babel/core'
|
||||
);
|
||||
|
||||
mergeDirs(path.resolve(__dirname, 'template/'), '.', 'overwrite');
|
||||
@ -28,11 +26,8 @@ export default async npmOptions => {
|
||||
packageJson.devDependencies['@storybook/addon-actions'] = addonActionVersion;
|
||||
packageJson.devDependencies['@storybook/addon-knobs'] = addonKnobsVersion;
|
||||
|
||||
if (!packageJson.dependencies['babel-core'] && !packageJson.devDependencies['babel-core']) {
|
||||
packageJson.devDependencies['babel-core'] = babelCoreVersion;
|
||||
}
|
||||
if (!packageJson.dependencies['babel-runtime'] && !packageJson.devDependencies['babel-runtime']) {
|
||||
packageJson.devDependencies['babel-runtime'] = babelRuntimeVersion;
|
||||
if (!packageJson.dependencies['@babel/core'] && !packageJson.devDependencies['@babel/core']) {
|
||||
packageJson.devDependencies['@babel/core'] = babelCoreVersion;
|
||||
}
|
||||
|
||||
packageJson.scripts = packageJson.scripts || {};
|
||||
|
@ -15,7 +15,7 @@ export default async npmOptions => {
|
||||
babelCoreVersion,
|
||||
presetEnvVersion,
|
||||
presetReactVersion,
|
||||
presetStage1Version,
|
||||
presetStage0Version,
|
||||
rootSlashImportVersion,
|
||||
] = await getVersions(
|
||||
npmOptions,
|
||||
@ -25,10 +25,10 @@ export default async npmOptions => {
|
||||
'@storybook/addons',
|
||||
'react',
|
||||
'react-dom',
|
||||
'babel-core',
|
||||
'babel-preset-env',
|
||||
'babel-preset-react',
|
||||
'babel-preset-stage-1',
|
||||
'@babel/core',
|
||||
'@babel/preset-env',
|
||||
'@babel/preset-react',
|
||||
'@babel/preset-stage-0',
|
||||
'babel-root-slash-import'
|
||||
);
|
||||
|
||||
@ -46,26 +46,30 @@ export default async npmOptions => {
|
||||
babelrc = JSON5.parse(babelrcContent);
|
||||
babelrc.plugins = babelrc.plugins || [];
|
||||
|
||||
if (babelrc.plugins.indexOf('babel-root-slash-import') < 0) {
|
||||
babelrc.plugins.push('babel-root-slash-import');
|
||||
if (babelrc.plugins.indexOf('module:babel-root-slash-import') < 0) {
|
||||
babelrc.plugins.push('module:babel-root-slash-import');
|
||||
packageJson.devDependencies['babel-root-slash-import'] = rootSlashImportVersion;
|
||||
}
|
||||
} else {
|
||||
babelrc = {
|
||||
presets: ['env', 'react', 'stage-1'],
|
||||
plugins: ['babel-root-slash-import'],
|
||||
presets: [
|
||||
'@babel/preset-env',
|
||||
'@babel/preset-react',
|
||||
['@babel/preset-stage-0', { decoratorsLegacy: true }],
|
||||
],
|
||||
plugins: ['module:babel-root-slash-import'],
|
||||
};
|
||||
|
||||
packageJson.devDependencies['babel-core'] = babelCoreVersion;
|
||||
packageJson.devDependencies['babel-preset-env'] = presetEnvVersion;
|
||||
packageJson.devDependencies['babel-preset-react'] = presetReactVersion;
|
||||
packageJson.devDependencies['babel-preset-stage-1'] = presetStage1Version;
|
||||
packageJson.devDependencies['@babel/preset-env'] = presetEnvVersion;
|
||||
packageJson.devDependencies['@babel/preset-react'] = presetReactVersion;
|
||||
packageJson.devDependencies['@babel/preset-stage-0'] = presetStage0Version;
|
||||
packageJson.devDependencies['babel-root-slash-import'] = rootSlashImportVersion;
|
||||
}
|
||||
|
||||
fs.writeFileSync('.babelrc', JSON.stringify(babelrc, null, 2), 'utf8');
|
||||
|
||||
// write the new package.json.
|
||||
packageJson.devDependencies['@babel/core'] = babelCoreVersion;
|
||||
packageJson.devDependencies['@storybook/react'] = storybookVersion;
|
||||
packageJson.devDependencies['@storybook/addon-actions'] = actionsVersion;
|
||||
packageJson.devDependencies['@storybook/addon-links'] = linksVersion;
|
||||
|
@ -1,6 +1,4 @@
|
||||
import path from 'path';
|
||||
import fs from 'fs';
|
||||
import JSON5 from 'json5';
|
||||
import mergeDirs from 'merge-dirs';
|
||||
import { getVersions, getPackageJson, writePackageJson } from '../../lib/helpers';
|
||||
|
||||
@ -11,15 +9,13 @@ export default async npmOptions => {
|
||||
linksVersion,
|
||||
addonsVersion,
|
||||
babelCoreVersion,
|
||||
babelPluginTransformReactJsxVersion,
|
||||
] = await getVersions(
|
||||
npmOptions,
|
||||
'@storybook/mithril',
|
||||
'@storybook/addon-actions',
|
||||
'@storybook/addon-links',
|
||||
'@storybook/addons',
|
||||
'babel-core',
|
||||
'babel-plugin-transform-react-jsx'
|
||||
'@babel/core'
|
||||
);
|
||||
|
||||
mergeDirs(path.resolve(__dirname, 'template/'), '.', 'overwrite');
|
||||
@ -33,32 +29,10 @@ export default async npmOptions => {
|
||||
packageJson.devDependencies['@storybook/addons'] = addonsVersion;
|
||||
packageJson.devDependencies['@storybook/mithril'] = storybookVersion;
|
||||
|
||||
// create or update .babelrc
|
||||
let babelrc = null;
|
||||
if (fs.existsSync('.babelrc')) {
|
||||
const babelrcContent = fs.readFileSync('.babelrc', 'utf8');
|
||||
babelrc = JSON5.parse(babelrcContent);
|
||||
babelrc.plugins = babelrc.plugins || [];
|
||||
|
||||
if (babelrc.plugins.indexOf('babel-plugin-transform-react-jsx') < 0) {
|
||||
babelrc.plugins.push('transform-react-jsx');
|
||||
packageJson.devDependencies[
|
||||
'babel-plugin-transform-react-jsx'
|
||||
] = babelPluginTransformReactJsxVersion;
|
||||
}
|
||||
} else {
|
||||
babelrc = {
|
||||
plugins: ['transform-react-jsx'],
|
||||
};
|
||||
|
||||
packageJson.devDependencies['babel-core'] = babelCoreVersion;
|
||||
packageJson.devDependencies[
|
||||
'babel-plugin-transform-react-jsx'
|
||||
] = babelPluginTransformReactJsxVersion;
|
||||
if (!packageJson.dependencies['@babel/core'] && !packageJson.devDependencies['@babel/core']) {
|
||||
packageJson.devDependencies['@babel/core'] = babelCoreVersion;
|
||||
}
|
||||
|
||||
fs.writeFileSync('.babelrc', JSON.stringify(babelrc, null, 2), 'utf8');
|
||||
|
||||
packageJson.scripts = packageJson.scripts || {};
|
||||
packageJson.scripts.storybook = 'start-storybook -p 6006';
|
||||
packageJson.scripts['build-storybook'] = 'build-storybook';
|
||||
|
@ -3,16 +3,10 @@ import path from 'path';
|
||||
import { getVersions, getPackageJson, writePackageJson } from '../../lib/helpers';
|
||||
|
||||
export default async npmOptions => {
|
||||
const [
|
||||
storybookVersion,
|
||||
babelCoreVersion,
|
||||
babelRuntimeVersion,
|
||||
polymerLoaderVarion,
|
||||
] = await getVersions(
|
||||
const [storybookVersion, babelCoreVersion, polymerLoaderVarion] = await getVersions(
|
||||
npmOptions,
|
||||
'@storybook/polymer',
|
||||
'babel-core',
|
||||
'babel-runtime',
|
||||
'@babel/core',
|
||||
'polymer-webpack-loader'
|
||||
);
|
||||
mergeDirs(path.resolve(__dirname, 'template'), '.', 'overwrite');
|
||||
@ -23,11 +17,8 @@ export default async npmOptions => {
|
||||
packageJson.devDependencies = packageJson.devDependencies || {};
|
||||
packageJson.devDependencies['@storybook/polymer'] = storybookVersion;
|
||||
|
||||
if (!packageJson.dependencies['babel-core'] && !packageJson.devDependencies['babel-core']) {
|
||||
packageJson.devDependencies['babel-core'] = babelCoreVersion;
|
||||
}
|
||||
if (!packageJson.dependencies['babel-runtime'] && !packageJson.devDependencies['babel-runtime']) {
|
||||
packageJson.devDependencies['babel-runtime'] = babelRuntimeVersion;
|
||||
if (!packageJson.dependencies['@babel/core'] && !packageJson.devDependencies['@babel/core']) {
|
||||
packageJson.devDependencies['@babel/core'] = babelCoreVersion;
|
||||
}
|
||||
if (
|
||||
!packageJson.dependencies['polymer-webpack-loader'] &&
|
||||
|
@ -9,15 +9,13 @@ export default async npmOptions => {
|
||||
linksVersion,
|
||||
addonsVersion,
|
||||
babelCoreVersion,
|
||||
babelRuntimeVersion,
|
||||
] = await getVersions(
|
||||
npmOptions,
|
||||
'@storybook/react',
|
||||
'@storybook/addon-actions',
|
||||
'@storybook/addon-links',
|
||||
'@storybook/addons',
|
||||
'babel-core',
|
||||
'babel-runtime'
|
||||
'@babel/core'
|
||||
);
|
||||
|
||||
mergeDirs(path.resolve(__dirname, 'template/'), '.', 'overwrite');
|
||||
@ -31,11 +29,8 @@ export default async npmOptions => {
|
||||
packageJson.devDependencies['@storybook/addon-links'] = linksVersion;
|
||||
packageJson.devDependencies['@storybook/addons'] = addonsVersion;
|
||||
|
||||
if (!packageJson.dependencies['babel-core'] && !packageJson.devDependencies['babel-core']) {
|
||||
packageJson.devDependencies['babel-core'] = babelCoreVersion;
|
||||
}
|
||||
if (!packageJson.dependencies['babel-runtime'] && !packageJson.devDependencies['babel-runtime']) {
|
||||
packageJson.devDependencies['babel-runtime'] = babelRuntimeVersion;
|
||||
if (!packageJson.dependencies['@babel/core'] && !packageJson.devDependencies['@babel/core']) {
|
||||
packageJson.devDependencies['@babel/core'] = babelCoreVersion;
|
||||
}
|
||||
|
||||
packageJson.scripts = packageJson.scripts || {};
|
||||
|
@ -19,8 +19,8 @@ export default async npmOptions => {
|
||||
'@storybook/addon-actions',
|
||||
'@storybook/addon-links',
|
||||
'@storybook/addons',
|
||||
'babel-core',
|
||||
'babel-runtime',
|
||||
'@babel/core',
|
||||
'@babel/runtime',
|
||||
'prop-types'
|
||||
);
|
||||
|
||||
@ -51,11 +51,14 @@ export default async npmOptions => {
|
||||
packageJson.devDependencies['@storybook/addon-links'] = linksVersion;
|
||||
packageJson.devDependencies['@storybook/addons'] = addonsVersion;
|
||||
|
||||
if (!packageJson.dependencies['babel-core'] && !packageJson.devDependencies['babel-core']) {
|
||||
packageJson.devDependencies['babel-core'] = babelCoreVersion;
|
||||
if (!packageJson.dependencies['@babel/core'] && !packageJson.devDependencies['@babel/core']) {
|
||||
packageJson.devDependencies['@babel/core'] = babelCoreVersion;
|
||||
}
|
||||
if (!packageJson.dependencies['babel-runtime'] && !packageJson.devDependencies['babel-runtime']) {
|
||||
packageJson.devDependencies['babel-runtime'] = babelRuntimeVersion;
|
||||
if (
|
||||
!packageJson.dependencies['@babel/runtime'] &&
|
||||
!packageJson.devDependencies['babel-runtime']
|
||||
) {
|
||||
packageJson.devDependencies['@babel/runtime'] = babelRuntimeVersion;
|
||||
}
|
||||
|
||||
if (!packageJson.dependencies['react-dom'] && !packageJson.devDependencies['react-dom']) {
|
||||
|
@ -17,8 +17,8 @@ export default async npmOptions => {
|
||||
'@storybook/addon-actions',
|
||||
'@storybook/addon-links',
|
||||
'@storybook/addons',
|
||||
'babel-core',
|
||||
'babel-runtime',
|
||||
'@babel/core',
|
||||
'@babel/runtime',
|
||||
'prop-types'
|
||||
);
|
||||
|
||||
@ -35,11 +35,14 @@ export default async npmOptions => {
|
||||
packageJson.devDependencies['@storybook/addon-links'] = linksVersion;
|
||||
packageJson.devDependencies['@storybook/addons'] = addonsVersion;
|
||||
|
||||
if (!packageJson.dependencies['babel-core'] && !packageJson.devDependencies['babel-core']) {
|
||||
packageJson.devDependencies['babel-core'] = babelCoreVersion;
|
||||
if (!packageJson.dependencies['@babel/core'] && !packageJson.devDependencies['@babel/core']) {
|
||||
packageJson.devDependencies['@babel/core'] = babelCoreVersion;
|
||||
}
|
||||
if (!packageJson.dependencies['babel-runtime'] && !packageJson.devDependencies['babel-runtime']) {
|
||||
packageJson.devDependencies['babel-runtime'] = babelRuntimeVersion;
|
||||
if (
|
||||
!packageJson.dependencies['@babel/runtime'] &&
|
||||
!packageJson.devDependencies['babel-runtime']
|
||||
) {
|
||||
packageJson.devDependencies['@babel/runtime'] = babelRuntimeVersion;
|
||||
}
|
||||
|
||||
if (!packageJson.dependencies['react-dom'] && !packageJson.devDependencies['react-dom']) {
|
||||
|
@ -10,15 +10,13 @@ export default async npmOptions => {
|
||||
linksVersion,
|
||||
addonsVersion,
|
||||
babelCoreVersion,
|
||||
babelRuntimeVersion,
|
||||
] = await getVersions(
|
||||
npmOptions,
|
||||
'@storybook/react',
|
||||
'@storybook/addon-actions',
|
||||
'@storybook/addon-links',
|
||||
'@storybook/addons',
|
||||
'babel-core',
|
||||
'babel-runtime'
|
||||
'@babel/core'
|
||||
);
|
||||
|
||||
mergeDirs(path.resolve(__dirname, 'template/'), '.', 'overwrite');
|
||||
@ -33,11 +31,8 @@ export default async npmOptions => {
|
||||
packageJson.devDependencies['@storybook/addon-links'] = linksVersion;
|
||||
packageJson.devDependencies['@storybook/addons'] = addonsVersion;
|
||||
|
||||
if (!packageJson.dependencies['babel-core'] && !packageJson.devDependencies['babel-core']) {
|
||||
packageJson.devDependencies['babel-core'] = babelCoreVersion;
|
||||
}
|
||||
if (!packageJson.dependencies['babel-runtime'] && !packageJson.devDependencies['babel-runtime']) {
|
||||
packageJson.devDependencies['babel-runtime'] = babelRuntimeVersion;
|
||||
if (!packageJson.dependencies['@babel/core'] && !packageJson.devDependencies['@babel/core']) {
|
||||
packageJson.devDependencies['@babel/core'] = babelCoreVersion;
|
||||
}
|
||||
|
||||
packageJson.scripts.storybook = 'start-storybook -p 9009';
|
||||
|
@ -1,12 +1,6 @@
|
||||
import mergeDirs from 'merge-dirs';
|
||||
import path from 'path';
|
||||
import {
|
||||
getVersions,
|
||||
getPackageJson,
|
||||
writePackageJson,
|
||||
getBabelRc,
|
||||
writeBabelRc,
|
||||
} from '../../lib/helpers';
|
||||
import { getVersions, getPackageJson, writePackageJson } from '../../lib/helpers';
|
||||
|
||||
export default async npmOptions => {
|
||||
const [
|
||||
@ -15,15 +9,13 @@ export default async npmOptions => {
|
||||
linksVersion,
|
||||
addonsVersion,
|
||||
babelCoreVersion,
|
||||
babelPresetVersion,
|
||||
] = await getVersions(
|
||||
npmOptions,
|
||||
'@storybook/vue',
|
||||
'@storybook/addon-actions',
|
||||
'@storybook/addon-links',
|
||||
'@storybook/addons',
|
||||
'babel-core',
|
||||
'babel-preset-vue'
|
||||
'@babel/core'
|
||||
);
|
||||
|
||||
mergeDirs(path.resolve(__dirname, 'template'), '.', 'overwrite');
|
||||
@ -37,28 +29,13 @@ export default async npmOptions => {
|
||||
packageJson.devDependencies['@storybook/addon-links'] = linksVersion;
|
||||
packageJson.devDependencies['@storybook/addons'] = addonsVersion;
|
||||
|
||||
if (!packageJson.dependencies['babel-core'] && !packageJson.devDependencies['babel-core']) {
|
||||
packageJson.devDependencies['babel-core'] = babelCoreVersion;
|
||||
if (!packageJson.dependencies['@babel/core'] && !packageJson.devDependencies['@babel/core']) {
|
||||
packageJson.devDependencies['@babel/core'] = babelCoreVersion;
|
||||
}
|
||||
packageJson.devDependencies['babel-preset-vue'] = babelPresetVersion;
|
||||
|
||||
packageJson.scripts = packageJson.scripts || {};
|
||||
packageJson.scripts.storybook = 'start-storybook -p 6006';
|
||||
packageJson.scripts['build-storybook'] = 'build-storybook';
|
||||
|
||||
writePackageJson(packageJson);
|
||||
|
||||
const babelRc = getBabelRc() || {
|
||||
presets: [['env', { modules: false }]],
|
||||
};
|
||||
const hasPreset = babelRc.presets.find(
|
||||
preset =>
|
||||
(Array.isArray(preset) && preset[0] === 'vue') ||
|
||||
(typeof preset === 'string' && preset === 'vue')
|
||||
);
|
||||
if (!hasPreset) {
|
||||
babelRc.presets.push('vue');
|
||||
}
|
||||
|
||||
writeBabelRc(babelRc);
|
||||
};
|
||||
|
@ -12,22 +12,18 @@ async function updatePackage(devDependencies, oldName, newName, npmOptions) {
|
||||
}
|
||||
|
||||
async function addPeerDependencies(packageJson, npmOptions) {
|
||||
const [addonsVersion, babelCoreVersion, babelRuntimeVersion] = await getVersions(
|
||||
const [addonsVersion, babelCoreVersion] = await getVersions(
|
||||
npmOptions,
|
||||
'@storybook/addons',
|
||||
'babel-core',
|
||||
'babel-runtime'
|
||||
'@babel/core'
|
||||
);
|
||||
|
||||
packageJson.dependencies = packageJson.dependencies || {};
|
||||
|
||||
packageJson.devDependencies['@storybook/addons'] = addonsVersion;
|
||||
|
||||
if (!packageJson.dependencies['babel-core'] && !packageJson.devDependencies['babel-core']) {
|
||||
packageJson.devDependencies['babel-core'] = babelCoreVersion;
|
||||
}
|
||||
if (!packageJson.dependencies['babel-runtime'] && !packageJson.devDependencies['babel-runtime']) {
|
||||
packageJson.devDependencies['babel-runtime'] = babelRuntimeVersion;
|
||||
if (!packageJson.dependencies['@babel/core'] && !packageJson.devDependencies['@babel/core']) {
|
||||
packageJson.devDependencies['@babel/core'] = babelCoreVersion;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,12 +1,6 @@
|
||||
import mergeDirs from 'merge-dirs';
|
||||
import path from 'path';
|
||||
import {
|
||||
getVersions,
|
||||
getPackageJson,
|
||||
writePackageJson,
|
||||
getBabelRc,
|
||||
writeBabelRc,
|
||||
} from '../../lib/helpers';
|
||||
import { getVersions, getPackageJson, writePackageJson } from '../../lib/helpers';
|
||||
|
||||
export default async npmOptions => {
|
||||
const [
|
||||
@ -15,15 +9,13 @@ export default async npmOptions => {
|
||||
linksVersion,
|
||||
addonsVersion,
|
||||
babelCoreVersion,
|
||||
babelPresetVersion,
|
||||
] = await getVersions(
|
||||
npmOptions,
|
||||
'@storybook/vue',
|
||||
'@storybook/addon-actions',
|
||||
'@storybook/addon-links',
|
||||
'@storybook/addons',
|
||||
'babel-core',
|
||||
'babel-preset-vue'
|
||||
'@babel/core'
|
||||
);
|
||||
|
||||
mergeDirs(path.resolve(__dirname, 'template'), '.', 'overwrite');
|
||||
@ -37,28 +29,13 @@ export default async npmOptions => {
|
||||
packageJson.devDependencies['@storybook/addon-links'] = linksVersion;
|
||||
packageJson.devDependencies['@storybook/addons'] = addonsVersion;
|
||||
|
||||
if (!packageJson.dependencies['babel-core'] && !packageJson.devDependencies['babel-core']) {
|
||||
packageJson.devDependencies['babel-core'] = babelCoreVersion;
|
||||
if (!packageJson.dependencies['@babel/core'] && !packageJson.devDependencies['@babel/core']) {
|
||||
packageJson.devDependencies['@babel/core'] = babelCoreVersion;
|
||||
}
|
||||
packageJson.devDependencies['babel-preset-vue'] = babelPresetVersion;
|
||||
|
||||
packageJson.scripts = packageJson.scripts || {};
|
||||
packageJson.scripts.storybook = 'start-storybook -p 6006';
|
||||
packageJson.scripts['build-storybook'] = 'build-storybook';
|
||||
|
||||
writePackageJson(packageJson);
|
||||
|
||||
const babelRc = getBabelRc() || {
|
||||
presets: [['env', { modules: false }]],
|
||||
};
|
||||
const hasPreset = babelRc.presets.find(
|
||||
preset =>
|
||||
(Array.isArray(preset) && preset[0] === 'vue') ||
|
||||
(typeof preset === 'string' && preset === 'vue')
|
||||
);
|
||||
if (!hasPreset) {
|
||||
babelRc.presets.push('vue');
|
||||
}
|
||||
|
||||
writeBabelRc(babelRc);
|
||||
};
|
||||
|
@ -9,15 +9,13 @@ export default async npmOptions => {
|
||||
linksVersion,
|
||||
addonsVersion,
|
||||
babelCoreVersion,
|
||||
babelRuntimeVersion,
|
||||
] = await getVersions(
|
||||
npmOptions,
|
||||
'@storybook/react',
|
||||
'@storybook/addon-actions',
|
||||
'@storybook/addon-links',
|
||||
'@storybook/addons',
|
||||
'babel-core',
|
||||
'babel-runtime'
|
||||
'@babel/core'
|
||||
);
|
||||
|
||||
mergeDirs(path.resolve(__dirname, 'template/'), '.', 'overwrite');
|
||||
@ -31,11 +29,8 @@ export default async npmOptions => {
|
||||
packageJson.devDependencies['@storybook/addon-links'] = linksVersion;
|
||||
packageJson.devDependencies['@storybook/addons'] = addonsVersion;
|
||||
|
||||
if (!packageJson.dependencies['babel-core'] && !packageJson.devDependencies['babel-core']) {
|
||||
packageJson.devDependencies['babel-core'] = babelCoreVersion;
|
||||
}
|
||||
if (!packageJson.dependencies['babel-runtime'] && !packageJson.devDependencies['babel-runtime']) {
|
||||
packageJson.devDependencies['babel-runtime'] = babelRuntimeVersion;
|
||||
if (!packageJson.dependencies['@babel/core'] && !packageJson.devDependencies['@babel/core']) {
|
||||
packageJson.devDependencies['@babel/core'] = babelCoreVersion;
|
||||
}
|
||||
|
||||
packageJson.scripts = packageJson.scripts || {};
|
||||
|
4
lib/cli/test/fixtures/react/.babelrc
vendored
4
lib/cli/test/fixtures/react/.babelrc
vendored
@ -1,4 +1,4 @@
|
||||
{
|
||||
"presets": ["react"],
|
||||
"plugins": ["external-helpers"]
|
||||
"presets": ["@babel/preset-react"],
|
||||
"plugins": ["@babel/plugin-external-helpers"]
|
||||
}
|
||||
|
4
lib/cli/test/fixtures/react/package.json
vendored
4
lib/cli/test/fixtures/react/package.json
vendored
@ -11,8 +11,8 @@
|
||||
"react-dom": "^15.6.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-plugin-external-helpers": "^6.22.0",
|
||||
"babel-preset-react": "^6.24.1",
|
||||
"@babel/plugin-external-helpers": "^7.0.0-beta.51",
|
||||
"@babel/preset-react": "^7.0.0-beta.51",
|
||||
"rollup": "^0.49.1",
|
||||
"rollup-plugin-babel": "^3.0.2",
|
||||
"rollup-plugin-commonjs": "^8.2.0",
|
||||
|
2
lib/cli/test/fixtures/react_project/.babelrc
vendored
2
lib/cli/test/fixtures/react_project/.babelrc
vendored
@ -1,3 +1,3 @@
|
||||
{
|
||||
"presets": ["env", "react"]
|
||||
"presets": ["@babel/preset-env", "@babel/preset-react"]
|
||||
}
|
||||
|
@ -7,8 +7,9 @@
|
||||
"build": "babel index.js -d dist"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-cli": "^6.26.0",
|
||||
"babel-preset-react": "^6.24.1",
|
||||
"@babel/cli": "^7.0.0-beta.51",
|
||||
"@babel/preset-env": "^7.0.0-beta.51",
|
||||
"@babel/preset-react": "^7.0.0-beta.51",
|
||||
"react": "^15.6.1",
|
||||
"react-dom": "^15.6.1"
|
||||
},
|
||||
|
12
lib/cli/test/fixtures/sfc_vue/.babelrc
vendored
12
lib/cli/test/fixtures/sfc_vue/.babelrc
vendored
@ -1,17 +1,21 @@
|
||||
{
|
||||
"presets": [
|
||||
["env", {
|
||||
["@babel/preset-env", {
|
||||
"modules": false,
|
||||
"targets": {
|
||||
"browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
|
||||
}
|
||||
}],
|
||||
"stage-2"
|
||||
["@babel/preset-stage-2", {
|
||||
"decoratorsLegacy": true
|
||||
}]
|
||||
],
|
||||
"plugins": ["transform-runtime"],
|
||||
"plugins": ["@babel/plugin-transform-runtime"],
|
||||
"env": {
|
||||
"test": {
|
||||
"presets": ["env", "stage-2"],
|
||||
"presets": ["@babel/preset-env", ["@babel/preset-stage-2", {
|
||||
"decoratorsLegacy": true
|
||||
}]],
|
||||
"plugins": ["istanbul"]
|
||||
}
|
||||
}
|
||||
|
12
lib/cli/test/fixtures/sfc_vue/package.json
vendored
12
lib/cli/test/fixtures/sfc_vue/package.json
vendored
@ -13,13 +13,13 @@
|
||||
"vue": "^2.4.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.0.0-beta.51",
|
||||
"@babel/plugin-transform-runtime": "^7.0.0-beta.51",
|
||||
"@babel/preset-env": "^7.0.0-beta.51",
|
||||
"@babel/preset-stage-2": "^7.0.0-beta.51",
|
||||
"@babel/register": "^7.0.0-beta.51",
|
||||
"autoprefixer": "^7.1.2",
|
||||
"babel-core": "^6.22.1",
|
||||
"babel-loader": "^7.1.1",
|
||||
"babel-plugin-transform-runtime": "^6.22.0",
|
||||
"babel-preset-env": "^1.3.2",
|
||||
"babel-preset-stage-2": "^6.22.0",
|
||||
"babel-register": "^6.22.0",
|
||||
"babel-loader": "^8.0.0-beta.4",
|
||||
"chalk": "^2.0.1",
|
||||
"connect-history-api-fallback": "^1.3.0",
|
||||
"copy-webpack-plugin": "^4.0.1",
|
||||
|
4
lib/cli/test/fixtures/webpack_react/.babelrc
vendored
4
lib/cli/test/fixtures/webpack_react/.babelrc
vendored
@ -1,4 +1,4 @@
|
||||
{
|
||||
"presets": ["react"],
|
||||
"plugins": ["external-helpers"]
|
||||
"presets": ["@babel/preset-react"],
|
||||
"plugins": ["@babel/plugin-external-helpers"]
|
||||
}
|
||||
|
@ -11,9 +11,9 @@
|
||||
"react-dom": "^15.6.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-core": "^6.26.0",
|
||||
"babel-loader": "^7.1.2",
|
||||
"babel-preset-react": "^6.24.1",
|
||||
"@babel/core": "^7.0.0-beta.51",
|
||||
"@babel/preset-react": "^7.0.0-beta.51",
|
||||
"babel-loader": "^8.0.0-beta.4",
|
||||
"webpack": "^3.5.5"
|
||||
}
|
||||
}
|
||||
|
@ -62,6 +62,7 @@ cd ..
|
||||
if [ $update -eq 1 ]
|
||||
then
|
||||
# copy `run` directory contents to `snapshots`, skipping irrelevant files
|
||||
rm -rf snapshots
|
||||
rsync -r --exclude={node_modules**,.DS_Store,*.md,yarn-error.log} run/ snapshots
|
||||
else if [ $skip -eq 0 ]
|
||||
then
|
||||
|
@ -1,32 +0,0 @@
|
||||
# Fixture
|
||||
|
||||
This project was generated with [angular-cli](https://github.com/angular/angular-cli) version 1.0.0-beta.28.3.
|
||||
|
||||
## Development server
|
||||
|
||||
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
|
||||
|
||||
## Code scaffolding
|
||||
|
||||
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive/pipe/service/class/module`.
|
||||
|
||||
## Build
|
||||
|
||||
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `-prod` flag for a production build.
|
||||
|
||||
## Running unit tests
|
||||
|
||||
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
|
||||
|
||||
## Running end-to-end tests
|
||||
|
||||
Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
|
||||
Before running the tests make sure you are serving the app via `ng serve`.
|
||||
|
||||
## Deploying to GitHub Pages
|
||||
|
||||
Run `ng github-pages:deploy` to deploy to GitHub Pages.
|
||||
|
||||
## Further help
|
||||
|
||||
To get more help on the `angular-cli` use `ng help` or go check out the [Angular-CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
|
@ -44,6 +44,7 @@
|
||||
"ts-node": "1.2.1",
|
||||
"tslint": "^4.3.0",
|
||||
"typescript": "~2.4.0",
|
||||
"@babel/core": "^7.0.0-beta.51",
|
||||
"@storybook/angular": "^4.0.0-alpha.12",
|
||||
"@storybook/addon-notes": "^4.0.0-alpha.12",
|
||||
"@storybook/addon-actions": "^4.0.0-alpha.12",
|
||||
|
@ -10,8 +10,7 @@
|
||||
"@storybook/marko": "^4.0.0-alpha.12",
|
||||
"@storybook/addon-actions": "^4.0.0-alpha.12",
|
||||
"@storybook/addon-knobs": "^4.0.0-alpha.12",
|
||||
"babel-core": "^6.26.3",
|
||||
"babel-runtime": "^6.26.0"
|
||||
"@babel/core": "^7.0.0-beta.51"
|
||||
},
|
||||
"scripts": {
|
||||
"storybook": "start-storybook -p 6006",
|
||||
|
@ -1,10 +1,15 @@
|
||||
{
|
||||
"presets": [
|
||||
"env",
|
||||
"react",
|
||||
"stage-1"
|
||||
"@babel/preset-env",
|
||||
"@babel/preset-react",
|
||||
[
|
||||
"@babel/preset-stage-0",
|
||||
{
|
||||
"decoratorsLegacy": true
|
||||
}
|
||||
]
|
||||
],
|
||||
"plugins": [
|
||||
"babel-root-slash-import"
|
||||
"module:babel-root-slash-import"
|
||||
]
|
||||
}
|
@ -14,11 +14,11 @@
|
||||
"react-dom": "^16.4.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-core": "^6.26.3",
|
||||
"babel-preset-env": "^1.7.0",
|
||||
"babel-preset-react": "^6.24.1",
|
||||
"babel-preset-stage-1": "^6.24.1",
|
||||
"@babel/preset-env": "^7.0.0-beta.51",
|
||||
"@babel/preset-react": "^7.0.0-beta.51",
|
||||
"@babel/preset-stage-0": "^7.0.0-beta.51",
|
||||
"babel-root-slash-import": "^1.1.0",
|
||||
"@babel/core": "^7.0.0-beta.51",
|
||||
"@storybook/react": "^4.0.0-alpha.12",
|
||||
"@storybook/addon-actions": "^4.0.0-alpha.12",
|
||||
"@storybook/addon-links": "^4.0.0-alpha.12",
|
||||
|
@ -1,5 +0,0 @@
|
||||
{
|
||||
"plugins": [
|
||||
"transform-react-jsx"
|
||||
]
|
||||
}
|
@ -16,7 +16,6 @@
|
||||
"@storybook/addon-links": "^4.0.0-alpha.12",
|
||||
"@storybook/addons": "^4.0.0-alpha.12",
|
||||
"@storybook/mithril": "^4.0.0-alpha.12",
|
||||
"babel-core": "^6.26.3",
|
||||
"babel-plugin-transform-react-jsx": "^6.24.1"
|
||||
"@babel/core": "^7.0.0-beta.51"
|
||||
}
|
||||
}
|
||||
|
@ -13,8 +13,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@storybook/polymer": "^4.0.0-alpha.12",
|
||||
"babel-core": "^6.26.3",
|
||||
"babel-runtime": "^6.26.0",
|
||||
"@babel/core": "^7.0.0-beta.51",
|
||||
"polymer-webpack-loader": "^2.0.2"
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{
|
||||
"presets": ["react"],
|
||||
"plugins": ["external-helpers"]
|
||||
"presets": ["@babel/preset-react"],
|
||||
"plugins": ["@babel/plugin-external-helpers"]
|
||||
}
|
||||
|
@ -13,8 +13,8 @@
|
||||
"react-dom": "^15.6.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-plugin-external-helpers": "^6.22.0",
|
||||
"babel-preset-react": "^6.24.1",
|
||||
"@babel/plugin-external-helpers": "^7.0.0-beta.51",
|
||||
"@babel/preset-react": "^7.0.0-beta.51",
|
||||
"rollup": "^0.49.1",
|
||||
"rollup-plugin-babel": "^3.0.2",
|
||||
"rollup-plugin-commonjs": "^8.2.0",
|
||||
@ -24,7 +24,6 @@
|
||||
"@storybook/addon-actions": "^4.0.0-alpha.12",
|
||||
"@storybook/addon-links": "^4.0.0-alpha.12",
|
||||
"@storybook/addons": "^4.0.0-alpha.12",
|
||||
"babel-core": "^6.26.3",
|
||||
"babel-runtime": "^6.26.0"
|
||||
"@babel/core": "^7.0.0-beta.51"
|
||||
}
|
||||
}
|
||||
|
@ -20,8 +20,8 @@
|
||||
"@storybook/addon-actions": "^4.0.0-alpha.12",
|
||||
"@storybook/addon-links": "^4.0.0-alpha.12",
|
||||
"@storybook/addons": "^4.0.0-alpha.12",
|
||||
"babel-core": "^6.26.3",
|
||||
"babel-runtime": "^6.26.0",
|
||||
"@babel/core": "^7.0.0-beta.51",
|
||||
"@babel/runtime": "^7.0.0-beta.51",
|
||||
"react-dom": "16.0.0-alpha.12",
|
||||
"prop-types": "^15.6.2"
|
||||
},
|
||||
|
@ -10,8 +10,8 @@
|
||||
"@storybook/addon-actions": "^4.0.0-alpha.12",
|
||||
"@storybook/addon-links": "^4.0.0-alpha.12",
|
||||
"@storybook/addons": "^4.0.0-alpha.12",
|
||||
"babel-core": "^6.26.3",
|
||||
"babel-runtime": "^6.26.0",
|
||||
"@babel/core": "^7.0.0-beta.51",
|
||||
"@babel/runtime": "^7.0.0-beta.51",
|
||||
"react-dom": "16.0.0-alpha.12",
|
||||
"prop-types": "^15.6.2"
|
||||
},
|
||||
|
@ -1,3 +1,3 @@
|
||||
{
|
||||
"presets": ["env", "react"]
|
||||
"presets": ["@babel/preset-env", "@babel/preset-react"]
|
||||
}
|
||||
|
@ -9,16 +9,16 @@
|
||||
"build-storybook": "build-storybook"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-cli": "^6.26.0",
|
||||
"babel-preset-react": "^6.24.1",
|
||||
"@babel/cli": "^7.0.0-beta.51",
|
||||
"@babel/preset-env": "^7.0.0-beta.51",
|
||||
"@babel/preset-react": "^7.0.0-beta.51",
|
||||
"react": "^15.6.1",
|
||||
"react-dom": "^15.6.1",
|
||||
"@storybook/react": "^4.0.0-alpha.12",
|
||||
"@storybook/addon-actions": "^4.0.0-alpha.12",
|
||||
"@storybook/addon-links": "^4.0.0-alpha.12",
|
||||
"@storybook/addons": "^4.0.0-alpha.12",
|
||||
"babel-core": "^6.26.3",
|
||||
"babel-runtime": "^6.26.0"
|
||||
"@babel/core": "^7.0.0-beta.51"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "*",
|
||||
|
@ -20,7 +20,6 @@
|
||||
"@storybook/addon-actions": "^4.0.0-alpha.12",
|
||||
"@storybook/addon-links": "^4.0.0-alpha.12",
|
||||
"@storybook/addons": "^4.0.0-alpha.12",
|
||||
"babel-core": "^6.26.3",
|
||||
"babel-runtime": "^6.26.0"
|
||||
"@babel/core": "^7.0.0-beta.51"
|
||||
}
|
||||
}
|
||||
|
@ -1,33 +1,22 @@
|
||||
{
|
||||
"presets": [
|
||||
[
|
||||
"env",
|
||||
{
|
||||
"modules": false,
|
||||
"targets": {
|
||||
"browsers": [
|
||||
"> 1%",
|
||||
"last 2 versions",
|
||||
"not ie <= 8"
|
||||
]
|
||||
}
|
||||
["@babel/preset-env", {
|
||||
"modules": false,
|
||||
"targets": {
|
||||
"browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
|
||||
}
|
||||
],
|
||||
"stage-2",
|
||||
"vue"
|
||||
],
|
||||
"plugins": [
|
||||
"transform-runtime"
|
||||
}],
|
||||
["@babel/preset-stage-2", {
|
||||
"decoratorsLegacy": true
|
||||
}]
|
||||
],
|
||||
"plugins": ["@babel/plugin-transform-runtime"],
|
||||
"env": {
|
||||
"test": {
|
||||
"presets": [
|
||||
"env",
|
||||
"stage-2"
|
||||
],
|
||||
"plugins": [
|
||||
"istanbul"
|
||||
]
|
||||
"presets": ["@babel/preset-env", ["@babel/preset-stage-2", {
|
||||
"decoratorsLegacy": true
|
||||
}]],
|
||||
"plugins": ["istanbul"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -15,13 +15,13 @@
|
||||
"vue": "^2.4.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.0.0-beta.51",
|
||||
"@babel/plugin-transform-runtime": "^7.0.0-beta.51",
|
||||
"@babel/preset-env": "^7.0.0-beta.51",
|
||||
"@babel/preset-stage-2": "^7.0.0-beta.51",
|
||||
"@babel/register": "^7.0.0-beta.51",
|
||||
"autoprefixer": "^7.1.2",
|
||||
"babel-core": "^6.22.1",
|
||||
"babel-loader": "^7.1.1",
|
||||
"babel-plugin-transform-runtime": "^6.22.0",
|
||||
"babel-preset-env": "^1.3.2",
|
||||
"babel-preset-stage-2": "^6.22.0",
|
||||
"babel-register": "^6.22.0",
|
||||
"babel-loader": "^8.0.0-beta.4",
|
||||
"chalk": "^2.0.1",
|
||||
"connect-history-api-fallback": "^1.3.0",
|
||||
"copy-webpack-plugin": "^4.0.1",
|
||||
@ -52,8 +52,7 @@
|
||||
"@storybook/vue": "^4.0.0-alpha.12",
|
||||
"@storybook/addon-actions": "^4.0.0-alpha.12",
|
||||
"@storybook/addon-links": "^4.0.0-alpha.12",
|
||||
"@storybook/addons": "^4.0.0-alpha.12",
|
||||
"babel-preset-vue": "^2.0.2"
|
||||
"@storybook/addons": "^4.0.0-alpha.12"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 4.0.0",
|
||||
|
@ -10,8 +10,7 @@
|
||||
"devDependencies": {
|
||||
"@storybook/react": "^4.0.0-alpha.12",
|
||||
"@storybook/addons": "^4.0.0-alpha.12",
|
||||
"babel-core": "^6.26.3",
|
||||
"babel-runtime": "^6.26.0"
|
||||
"@babel/core": "^7.0.0-beta.51"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "react-scripts start",
|
||||
|
@ -1,11 +0,0 @@
|
||||
{
|
||||
"presets": [
|
||||
[
|
||||
"env",
|
||||
{
|
||||
"modules": false
|
||||
}
|
||||
],
|
||||
"vue"
|
||||
]
|
||||
}
|
@ -38,6 +38,6 @@
|
||||
"@storybook/addon-actions": "^4.0.0-alpha.12",
|
||||
"@storybook/addon-links": "^4.0.0-alpha.12",
|
||||
"@storybook/addons": "^4.0.0-alpha.12",
|
||||
"babel-preset-vue": "^2.0.2"
|
||||
"@babel/core": "^7.0.0-beta.51"
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{
|
||||
"presets": ["react"],
|
||||
"plugins": ["external-helpers"]
|
||||
"presets": ["@babel/preset-react"],
|
||||
"plugins": ["@babel/plugin-external-helpers"]
|
||||
}
|
||||
|
@ -13,14 +13,13 @@
|
||||
"react-dom": "^15.6.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-core": "^6.26.0",
|
||||
"babel-loader": "^7.1.2",
|
||||
"babel-preset-react": "^6.24.1",
|
||||
"@babel/core": "^7.0.0-beta.51",
|
||||
"@babel/preset-react": "^7.0.0-beta.51",
|
||||
"babel-loader": "^8.0.0-beta.4",
|
||||
"webpack": "^3.5.5",
|
||||
"@storybook/react": "^4.0.0-alpha.12",
|
||||
"@storybook/addon-actions": "^4.0.0-alpha.12",
|
||||
"@storybook/addon-links": "^4.0.0-alpha.12",
|
||||
"@storybook/addons": "^4.0.0-alpha.12",
|
||||
"babel-runtime": "^6.26.0"
|
||||
"@storybook/addons": "^4.0.0-alpha.12"
|
||||
}
|
||||
}
|
||||
|
@ -58,6 +58,7 @@
|
||||
"babel-core": "^7.0.0-bridge.0",
|
||||
"babel-eslint": "^8.2.5",
|
||||
"babel-jest": "^23.2.0",
|
||||
"babel-loader": "^8.0.0-beta.4",
|
||||
"babel-plugin-emotion": "^9.2.4",
|
||||
"babel-plugin-macros": "^2.2.2",
|
||||
"babel-plugin-require-context-hook": "^1.0.0",
|
||||
|
Loading…
x
Reference in New Issue
Block a user