Skip to content

Commit

Permalink
Choer: Babelify everything (#1105)
Browse files Browse the repository at this point in the history
Closes #1096
  • Loading branch information
vivek12345 authored and sapegin committed Aug 26, 2018
1 parent e079c31 commit 86c4d59
Show file tree
Hide file tree
Showing 397 changed files with 924 additions and 2,152 deletions.
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"settings": {
"import/resolver": {
"node": {
"moduleDirectory": ["src", "node_modules"]
"moduleDirectory": ["src/client", "node_modules"]
}
}
},
Expand Down
5 changes: 0 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ branches:
- /^v\d+\.\d+\.\d+$/
stages:
- lint
- typecheck
- test
- integration
- coverage
Expand All @@ -35,10 +34,6 @@ jobs:
- npm run lint
- npx danger ci

- stage: typecheck
script:
- npm run flow

- stage: integration
script:
# Compile JS
Expand Down
17 changes: 17 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,23 @@ module.exports = {
'@babel/flow',
],
plugins: ['@babel/plugin-proposal-class-properties'],
overrides: [
{
include: ['src/bin', 'src/loaders', 'src/scripts'],
presets: [
[
'@babel/env',
{
modules: 'commonjs',
useBuiltIns: 'usage',
targets: {
node: '6',
},
},
],
],
},
],
env: {
test: {
presets: ['@babel/env', '@babel/react', '@babel/flow'],
Expand Down
2 changes: 1 addition & 1 deletion docs/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ module.exports = {

Type: `Boolean` or `String`, default: `false`

For components that do not have an example, a default one can be used. When set to `true`, the [DefaultExample.md](https://github.com/styleguidist/react-styleguidist/blob/master/scripts/templates/DefaultExample.md) is used, or you can provide the path to your own example Markdown file.
For components that do not have an example, a default one can be used. When set to `true`, the [DefaultExample.md](https://github.com/styleguidist/react-styleguidist/blob/master/templates/DefaultExample.md) is used, or you can provide the path to your own example Markdown file.

When writing your own default example file, `__COMPONENT__` will be replaced by the actual component name at compile time.

Expand Down
2 changes: 1 addition & 1 deletion examples/customised/styleguide/components/Sections.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
import Styled from 'rsg-components/Styled';
import Heading from 'rsg-components/Heading';
// Import default implementation from react-styleguidist using the full path
import DefaultSections from 'react-styleguidist/lib/rsg-components/Sections/SectionsRenderer';
import DefaultSections from 'react-styleguidist/lib/client/rsg-components/Sections/SectionsRenderer';

const styles = ({ fontFamily, color, space }) => ({
headingSpacer: {
Expand Down
1 change: 0 additions & 1 deletion examples/sections/babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ module.exports = {
[
'@babel/env',
{
debug: true,
modules: false,
useBuiltIns: 'usage',
},
Expand Down
Loading

0 comments on commit 86c4d59

Please sign in to comment.