-
-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use
babelrc: false
only for custom config in .storybook
directory
- Loading branch information
Showing
94 changed files
with
1,112 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
lib/cli/test/fixtures/react_babel_config_js/.storybook/config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { configure } from '@storybook/react'; | ||
|
||
// automatically import all files ending in *.stories.js | ||
const req = require.context('../stories', true, /.stories.js$/); | ||
function loadStories() { | ||
req.keys().forEach(filename => req(filename)); | ||
} | ||
|
||
configure(loadStories, module); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
plugins: ['@babel/plugin-proposal-optional-chaining'], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"name": "react-babel-config-js-fixture", | ||
"version": "1.0.0", | ||
"license": "MIT", | ||
"main": "stories/index.stories.js", | ||
"scripts": { | ||
"storybook": "start-storybook -p 6006", | ||
"build-storybook": "build-storybook" | ||
}, | ||
"dependencies": { | ||
"react": "^16.4.2", | ||
"react-dom": "^16.4.2" | ||
}, | ||
"devDependencies": { | ||
"@babel/plugin-proposal-optional-chaining": "7.0.0-rc.3", | ||
"@babel/core": "7.0.0-rc.3", | ||
"babel-loader": "8.0.0-beta.6", | ||
"@storybook/react": "^4.0.0-alpha.17" | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
lib/cli/test/fixtures/react_babel_config_js/stories/index.stories.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import React from 'react'; | ||
|
||
import { storiesOf } from '@storybook/react'; | ||
|
||
const data = { | ||
user: { | ||
name: 'Joe', | ||
}, | ||
}; | ||
|
||
storiesOf('My Component', module) | ||
.add('state', () => <span>Hello {data.user?.name}</span>) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"presets": ["./babel-preset-custom"] | ||
} |
9 changes: 9 additions & 0 deletions
9
lib/cli/test/fixtures/react_babel_custom_preset/.storybook/config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { configure } from '@storybook/react'; | ||
|
||
// automatically import all files ending in *.stories.js | ||
const req = require.context('../stories', true, /.stories.js$/); | ||
function loadStories() { | ||
req.keys().forEach(filename => req(filename)); | ||
} | ||
|
||
configure(loadStories, module); |
3 changes: 3 additions & 0 deletions
3
lib/cli/test/fixtures/react_babel_custom_preset/babel-preset-custom/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = () => ({ | ||
plugins: ['@babel/plugin-proposal-optional-chaining'], | ||
}); |
20 changes: 20 additions & 0 deletions
20
lib/cli/test/fixtures/react_babel_custom_preset/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"name": "react-babel-custom-preset-fixture", | ||
"version": "1.0.0", | ||
"license": "MIT", | ||
"main": "stories/index.stories.js", | ||
"scripts": { | ||
"storybook": "start-storybook -p 6006", | ||
"build-storybook": "build-storybook" | ||
}, | ||
"dependencies": { | ||
"react": "^16.4.2", | ||
"react-dom": "^16.4.2" | ||
}, | ||
"devDependencies": { | ||
"@babel/plugin-proposal-optional-chaining": "7.0.0-rc.3", | ||
"@babel/core": "7.0.0-rc.3", | ||
"babel-loader": "8.0.0-beta.6", | ||
"@storybook/react": "^4.0.0-alpha.17" | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
lib/cli/test/fixtures/react_babel_custom_preset/stories/index.stories.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import React from 'react'; | ||
|
||
import { storiesOf } from '@storybook/react'; | ||
|
||
const data = { | ||
user: { | ||
name: 'Joe', | ||
}, | ||
}; | ||
|
||
storiesOf('My Component', module) | ||
.add('state', () => <span>Hello {data.user?.name}</span>) |
9 changes: 9 additions & 0 deletions
9
lib/cli/test/fixtures/react_babel_pkg_json/.storybook/config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { configure } from '@storybook/react'; | ||
|
||
// automatically import all files ending in *.stories.js | ||
const req = require.context('../stories', true, /.stories.js$/); | ||
function loadStories() { | ||
req.keys().forEach(filename => req(filename)); | ||
} | ||
|
||
configure(loadStories, module); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"name": "react-babel-pkg-json-fixture", | ||
"version": "1.0.0", | ||
"license": "MIT", | ||
"main": "stories/index.stories.js", | ||
"scripts": { | ||
"storybook": "start-storybook -p 6006", | ||
"build-storybook": "build-storybook" | ||
}, | ||
"dependencies": { | ||
"react": "^16.4.2", | ||
"react-dom": "^16.4.2" | ||
}, | ||
"devDependencies": { | ||
"@babel/plugin-proposal-optional-chaining": "7.0.0-rc.3", | ||
"@babel/core": "7.0.0-rc.3", | ||
"babel-loader": "8.0.0-beta.6", | ||
"@storybook/react": "^4.0.0-alpha.17" | ||
}, | ||
"babel": { | ||
"plugins": ["@babel/plugin-proposal-optional-chaining"] | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
lib/cli/test/fixtures/react_babel_pkg_json/stories/index.stories.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import React from 'react'; | ||
|
||
import { storiesOf } from '@storybook/react'; | ||
|
||
const data = { | ||
user: { | ||
name: 'Joe', | ||
}, | ||
}; | ||
|
||
storiesOf('My Component', module) | ||
.add('state', () => <span>Hello {data.user?.name}</span>) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"plugins": ["@babel/plugin-proposal-optional-chaining"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { configure } from '@storybook/react'; | ||
|
||
// automatically import all files ending in *.stories.js | ||
const req = require.context('../stories', true, /.stories.js$/); | ||
function loadStories() { | ||
req.keys().forEach(filename => req(filename)); | ||
} | ||
|
||
configure(loadStories, module); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"name": "react-babelrc-fixture", | ||
"version": "1.0.0", | ||
"license": "MIT", | ||
"main": "stories/index.stories.js", | ||
"scripts": { | ||
"storybook": "start-storybook -p 6006", | ||
"build-storybook": "build-storybook" | ||
}, | ||
"dependencies": { | ||
"react": "^16.4.2", | ||
"react-dom": "^16.4.2" | ||
}, | ||
"devDependencies": { | ||
"@babel/plugin-proposal-optional-chaining": "7.0.0-rc.3", | ||
"@babel/core": "7.0.0-rc.3", | ||
"babel-loader": "8.0.0-beta.6", | ||
"@storybook/react": "^4.0.0-alpha.17" | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
lib/cli/test/fixtures/react_babelrc/stories/index.stories.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import React from 'react'; | ||
|
||
import { storiesOf } from '@storybook/react'; | ||
|
||
const data = { | ||
user: { | ||
name: 'Joe', | ||
}, | ||
}; | ||
|
||
storiesOf('My Component', module) | ||
.add('state', () => <span>Hello {data.user?.name}</span>) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
plugins: ['@babel/plugin-proposal-optional-chaining'], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { configure } from '@storybook/react'; | ||
|
||
// automatically import all files ending in *.stories.js | ||
const req = require.context('../stories', true, /.stories.js$/); | ||
function loadStories() { | ||
req.keys().forEach(filename => req(filename)); | ||
} | ||
|
||
configure(loadStories, module); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"name": "react-babelrc-js-fixture", | ||
"version": "1.0.0", | ||
"license": "MIT", | ||
"main": "stories/index.stories.js", | ||
"scripts": { | ||
"storybook": "start-storybook -p 6006", | ||
"build-storybook": "build-storybook" | ||
}, | ||
"dependencies": { | ||
"react": "^16.4.2", | ||
"react-dom": "^16.4.2" | ||
}, | ||
"devDependencies": { | ||
"@babel/plugin-proposal-optional-chaining": "7.0.0-rc.3", | ||
"@babel/core": "7.0.0-rc.3", | ||
"babel-loader": "8.0.0-beta.6", | ||
"@storybook/react": "^4.0.0-alpha.17" | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
lib/cli/test/fixtures/react_babelrc_js/stories/index.stories.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import React from 'react'; | ||
|
||
import { storiesOf } from '@storybook/react'; | ||
|
||
const data = { | ||
user: { | ||
name: 'Joe', | ||
}, | ||
}; | ||
|
||
storiesOf('My Component', module) | ||
.add('state', () => <span>Hello {data.user?.name}</span>) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": "react-static/.babelrc" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# dependencies | ||
/node_modules | ||
|
||
# testing | ||
/coverage | ||
|
||
# production | ||
/dist | ||
/tmp | ||
|
||
# misc | ||
.DS_Store | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# React-Static - Blank Example | ||
|
||
This example is a blank version of react-static. It includes:: | ||
- Babel | ||
- CSS imports | ||
- Image imports | ||
- File imports | ||
|
||
To get started, run `react-static create` and use the `blank` template. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"name": "react-static-fixture", | ||
"version": "1.0.1", | ||
"main": "index.js", | ||
"license": "MIT", | ||
"scripts": { | ||
"start": "react-static start", | ||
"stage": "react-static build --staging", | ||
"build": "react-static build", | ||
"serve": "serve dist -p 3000" | ||
}, | ||
"dependencies": { | ||
"axios": "^0.16.2", | ||
"react": "^16.0.0", | ||
"react-dom": "^16.0.0", | ||
"react-router": "^4.2.0", | ||
"react-static": "^5" | ||
}, | ||
"devDependencies": { | ||
"babel-core":"^6.26.3", | ||
"eslint-config-react-tools": "1.x.x", | ||
"serve": "^6.1.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
User-agent: * |
Oops, something went wrong.