Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/next' into react-native/use-core…
Browse files Browse the repository at this point in the history
…-for-server

# Conflicts:
#	addons/ondevice-knobs/package.json
#	app/react-native/package.json
#	app/react-native/readme.md
#	examples-native/crna-kitchen-sink/package.json
#	lib/addons/package.json
#	lib/addons/src/make-decorator.test.ts
#	lib/client-api/package.json
#	lib/client-api/src/client_api.test.js
#	lib/client-api/src/index.js
#	lib/client-api/src/story_store.js
#	lib/client-api/src/story_store.test.js
#	lib/core/package.json
#	lib/core/src/client/preview/index.js
#	lib/core/src/client/preview/start.js
#	lib/core/src/server/build-dev.js
#	lib/core/src/server/dev-server.js
#	lib/core/src/server/manager/manager-preset.js
#	yarn.lock
  • Loading branch information
igor-dv committed Feb 8, 2019
2 parents 511d89a + 1dfb31f commit 5a56263
Show file tree
Hide file tree
Showing 904 changed files with 64,073 additions and 32,200 deletions.
26 changes: 22 additions & 4 deletions .babelrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ module.exports = {
'@babel/preset-flow',
],
plugins: [
'babel-plugin-emotion',
'babel-plugin-macros',
'@babel/plugin-proposal-class-properties',
'@babel/plugin-proposal-object-rest-spread',
['@babel/plugin-proposal-object-rest-spread', { loose: true, useBuiltIns: true }],
'@babel/plugin-proposal-export-default-from',
'@babel/plugin-syntax-dynamic-import',
['@babel/plugin-proposal-class-properties', { loose: true }],
'babel-plugin-macros',
['emotion', { sourceMap: true, autoLabel: true }],
],
env: {
test: {
Expand All @@ -22,6 +23,23 @@ module.exports = {
test: './examples/vue-kitchen-sink',
presets: ['babel-preset-vue'],
},
{
test: './lib',
presets: [
['@babel/preset-env', { shippedProposals: true, useBuiltIns: 'usage' }],
'@babel/preset-react',
],
plugins: [
['@babel/plugin-proposal-object-rest-spread', { loose: true, useBuiltIns: true }],
'@babel/plugin-proposal-export-default-from',
'@babel/plugin-syntax-dynamic-import',
['@babel/plugin-proposal-class-properties', { loose: true }],
'babel-plugin-macros',
['emotion', { sourceMap: true, autoLabel: true }],
'@babel/plugin-transform-react-constant-elements',
'babel-plugin-add-react-displayname',
],
},
{
test: [
'./lib/core/src/server',
Expand Down
16 changes: 13 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ jobs:
command: |
cd examples/cra-kitchen-sink
yarn build-storybook
- run:
name: Build react typescript kitchen-sink
command: |
cd examples/cra-ts-kitchen-sink
yarn build-storybook
- run:
name: Build vue kitchen-sink
command: |
Expand Down Expand Up @@ -109,9 +114,9 @@ jobs:
command: |
cd examples/official-storybook
yarn build-storybook
- run:
name: Run image snapshots
command: yarn test --image
# - run:
# name: Run image snapshots
# command: yarn test --image
- store_artifacts:
path: examples/official-storybook/image-snapshots/__image_snapshots__
destination: official_storybook_image_snapshots
Expand All @@ -126,6 +131,11 @@ jobs:
command: |
cd examples/cra-kitchen-sink
yarn storybook --smoke-test --quiet
- run:
name: Run react typescript kitchen-sink (smoke test)
command: |
cd examples/cra-ts-kitchen-sink
yarn storybook --smoke-test --quiet
- run:
name: Run vue kitchen-sink (smoke test)
command: |
Expand Down
63 changes: 12 additions & 51 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
const error = 2;
const warn = 1;
const ignore = 0;

module.exports = {
root: true,
extends: [
Expand All @@ -11,37 +10,18 @@ module.exports = {
'prettier',
'prettier/react',
],
plugins: ['prettier', 'jest', 'import', 'react', 'jsx-a11y', 'json'],
plugins: ['prettier', 'jest', 'import', 'react', 'jsx-a11y', 'json', 'html'],
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 8,
sourceType: 'module',
},
env: {
es6: true,
node: true,
'jest/globals': true,
},
parserOptions: { ecmaVersion: 8, sourceType: 'module' },
env: { es6: true, node: true, 'jest/globals': true },
settings: {
'import/core-modules': ['enzyme'],
'import/ignore': ['node_modules\\/(?!@storybook)'],
'import/resolver': {
node: {
extensions: ['.js', '.ts'],
},
},
'import/resolver': { node: { extensions: ['.js', '.ts'] } },
'html/html-extensions': ['.html'],
},
rules: {
'prettier/prettier': [
warn,
{
printWidth: 100,
tabWidth: 2,
bracketSpacing: true,
trailingComma: 'es5',
singleQuote: true,
},
],
'prettier/prettier': [warn],
'no-debugger': process.env.NODE_ENV === 'production' ? error : ignore,
'class-methods-use-this': ignore,
'import/extensions': [
Expand Down Expand Up @@ -91,6 +71,7 @@ module.exports = {
allowBind: true,
},
],
'jsx-a11y/accessible-emoji': ignore,
'jsx-a11y/label-has-associated-control': [
warn,
{
Expand All @@ -101,46 +82,26 @@ module.exports = {
},
],
'react/no-unescaped-entities': ignore,
'jsx-a11y/label-has-for': [
error,
{
required: {
some: ['nesting', 'id'],
},
},
],
'jsx-a11y/label-has-for': [error, { required: { some: ['nesting', 'id'] } }],
'jsx-a11y/anchor-is-valid': [
error,
{
components: ['RoutedLink', 'MenuLink', 'LinkTo', 'Link'],
components: ['A', 'LinkTo', 'Link'],
specialLink: ['overrideParams', 'kind', 'story', 'to'],
},
],
'no-underscore-dangle': [
error,
{
allow: ['__STORYBOOK_CLIENT_API__', '__STORYBOOK_ADDONS_CHANNEL__'],
},
{ allow: ['__STORYBOOK_CLIENT_API__', '__STORYBOOK_ADDONS_CHANNEL__'] },
],
},
overrides: [
{
files: ['**/__tests__/**', '**/*.test.js/**'],
files: ['**/__tests__/**', '**/*.test.js', '**/*.stories.js', '**/storyshots/**/stories/**'],
rules: {
'import/no-extraneous-dependencies': ignore,
},
},
{
files: ['**/react-native*/**', '**/REACT_NATIVE*/**', '**/crna*/**'],
rules: {
'jsx-a11y/accessible-emoji': ignore,
},
},
{
files: '**/.storybook/config.js',
rules: {
'global-require': ignore,
},
},
{ files: '**/.storybook/config.js', rules: { 'global-require': ignore } },
],
};
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

/examples/angular-cli/ @igor-dv @alterx
/examples/cra-kitchen-sink/ @ndelangen @UsulPro @hypnosphi
/examples/cra-ts-kitchen-sink/ @mucsi96
/examples/official-storybook/ @hypnosphi @danielduan @UsulPro
/examples/polymer-cli/ @naipath @igor-dv
/examples/vue-kitchen-sink/ @igor-dv @alexandrebodin
Expand Down
12 changes: 12 additions & 0 deletions .github/main.workflow
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
workflow "New workflow" {
on = "push"
resolves = ["Hello World"]
}

action "Hello World" {
uses = "./ci/action-a"
env = {
MY_NAME = "Mona"
}
args = "\"Hello world, I'm $MY_NAME!\""
}
8 changes: 1 addition & 7 deletions .spelling
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,10 @@ HMR
Redux
storybook-ui
react-komposer
redux
serializable
params
- addons/actions/node_modules/@storybook/addons/README.md
README.md
storybooks.js.org
- addons/actions/node_modules/asap/README.md
YuzuJS
setImmediate
Malte
Expand All @@ -78,15 +76,11 @@ Katić
Domenic
Kowal
Zakas
- addons/actions/node_modules/balanced-match/README.md
Gruber
julian
juliangruber.com
- addons/actions/node_modules/brace-expansion/README.md
Schlueter
- addons/links/README.md
linkTo
- lib/ui/README.md
setOptions
setStories
onStory
34 changes: 18 additions & 16 deletions .teamcity/OpenSourceProjects_Storybook/buildTypes/StorybookApp.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import jetbrains.buildServer.configs.kotlin.v2017_2.failureConditions.failOnMetr

enum class StorybookApp(val appName: String, val exampleDir: String, val merged: Boolean = true) {
CRA("CRA", "cra-kitchen-sink"),
CRA_TS("CRA TS", "cra-ts-kitchen-sink"),
VUE("Vue", "vue-kitchen-sink"),
ANGULAR("Angular", "angular-cli"),
POLYMER("Polymer", "polymer-cli"),
Expand All @@ -19,19 +20,34 @@ enum class StorybookApp(val appName: String, val exampleDir: String, val merged:
EMBER("Ember", "ember-cli"),
PREACT("Preact", "preact-kitchen-sink", false);

val lowerName = appName.toLowerCase()
val underscoreName = appName.replace(' ', '_')
val lowerName = underscoreName.toLowerCase()

val artifactPath = "examples/$exampleDir/storybook-static => $lowerName.zip"

val config = object : BuildType(init@{
uuid = "8cc5f747-4ca7-4f0d-940d-b0c422f501a6-$lowerName"
id = "OpenSourceProjects_Storybook_$appName"
id = "OpenSourceProjects_Storybook_$underscoreName"
name = appName

vcs {
root(OpenSourceProjects_Storybook.vcsRoots.OpenSourceProjects_Storybook_HttpsGithubComStorybooksStorybookRefsHeadsMaster)
}

dependencies {
dependency(OpenSourceProjects_Storybook.buildTypes.OpenSourceProjects_Storybook_Bootstrap) {
snapshot {
onDependencyFailure = FailureAction.FAIL_TO_START
}

artifacts {
artifactRules = """
dist.zip!**
""".trimIndent()
}
}
}

if (!merged) return@init

artifactRules = artifactPath
Expand Down Expand Up @@ -76,20 +92,6 @@ enum class StorybookApp(val appName: String, val exampleDir: String, val merged:
}
}

dependencies {
dependency(OpenSourceProjects_Storybook.buildTypes.OpenSourceProjects_Storybook_Bootstrap) {
snapshot {
onDependencyFailure = FailureAction.FAIL_TO_START
}

artifacts {
artifactRules = """
dist.zip!**
""".trimIndent()
}
}
}

requirements {
doesNotContain("env.OS", "Windows")
}
Expand Down
Loading

0 comments on commit 5a56263

Please sign in to comment.