Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,15 @@
"contributions": [
"code"
]
},
{
"login": "fobbyal",
"name": "Alex Liang",
"avatar_url": "https://avatars2.githubusercontent.com/u/7818365?v=4",
"profile": "https://github.com/fobbyal",
"contributions": [
"code"
]
}
],
"repoType": "github"
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
[![downloads][downloads-badge]][npmcharts]
[![MIT License][license-badge]][license]

[![All Contributors](https://img.shields.io/badge/all_contributors-8-orange.svg?style=flat-square)](#contributors)
[![All Contributors](https://img.shields.io/badge/all_contributors-9-orange.svg?style=flat-square)](#contributors)
[![PRs Welcome][prs-badge]][prs]
[![Code of Conduct][coc-badge]][coc]

Expand Down Expand Up @@ -128,7 +128,7 @@ Thanks goes to these people ([emoji key][emojis]):
<!-- prettier-ignore -->
| [<img src="https://avatars.githubusercontent.com/u/1500684?v=3" width="100px;"/><br /><sub><b>Kent C. Dodds</b></sub>](https://kentcdodds.com)<br />[💻](https://github.com/kentcdodds/kcd-scripts/commits?author=kentcdodds "Code") [📖](https://github.com/kentcdodds/kcd-scripts/commits?author=kentcdodds "Documentation") [🚇](#infra-kentcdodds "Infrastructure (Hosting, Build-Tools, etc)") [⚠️](https://github.com/kentcdodds/kcd-scripts/commits?author=kentcdodds "Tests") | [<img src="https://avatars2.githubusercontent.com/u/22251956?v=4" width="100px;"/><br /><sub><b>Suhas Karanth</b></sub>](https://github.com/sudo-suhas)<br />[💻](https://github.com/kentcdodds/kcd-scripts/commits?author=sudo-suhas "Code") [🐛](https://github.com/kentcdodds/kcd-scripts/issues?q=author%3Asudo-suhas "Bug reports") [⚠️](https://github.com/kentcdodds/kcd-scripts/commits?author=sudo-suhas "Tests") | [<img src="https://avatars0.githubusercontent.com/u/1402095?v=4" width="100px;"/><br /><sub><b>Matt Parrish</b></sub>](https://github.com/pbomb)<br />[💻](https://github.com/kentcdodds/kcd-scripts/commits?author=pbomb "Code") [⚠️](https://github.com/kentcdodds/kcd-scripts/commits?author=pbomb "Tests") | [<img src="https://avatars3.githubusercontent.com/u/1319157?v=4" width="100px;"/><br /><sub><b>Mateus</b></sub>](https://github.com/mateuscb)<br />[💻](https://github.com/kentcdodds/kcd-scripts/commits?author=mateuscb "Code") [⚠️](https://github.com/kentcdodds/kcd-scripts/commits?author=mateuscb "Tests") | [<img src="https://avatars1.githubusercontent.com/u/2344137?v=4" width="100px;"/><br /><sub><b>Macklin Underdown</b></sub>](http://macklin.underdown.me)<br />[💻](https://github.com/kentcdodds/kcd-scripts/commits?author=macklinu "Code") [⚠️](https://github.com/kentcdodds/kcd-scripts/commits?author=macklinu "Tests") | [<img src="https://avatars2.githubusercontent.com/u/179534?v=4" width="100px;"/><br /><sub><b>stereobooster</b></sub>](https://github.com/stereobooster)<br />[💻](https://github.com/kentcdodds/kcd-scripts/commits?author=stereobooster "Code") [⚠️](https://github.com/kentcdodds/kcd-scripts/commits?author=stereobooster "Tests") | [<img src="https://avatars0.githubusercontent.com/u/410792?v=4" width="100px;"/><br /><sub><b>Dony Sukardi</b></sub>](http://dsds.io)<br />[🐛](https://github.com/kentcdodds/kcd-scripts/issues?q=author%3Adonysukardi "Bug reports") [💻](https://github.com/kentcdodds/kcd-scripts/commits?author=donysukardi "Code") |
| :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| [<img src="https://avatars3.githubusercontent.com/u/8997319?v=4" width="100px;"/><br /><sub><b>Alexander Nanberg</b></sub>](https://alexandernanberg.com)<br />[💻](https://github.com/kentcdodds/kcd-scripts/commits?author=alexandernanberg "Code") |
| [<img src="https://avatars3.githubusercontent.com/u/8997319?v=4" width="100px;"/><br /><sub><b>Alexander Nanberg</b></sub>](https://alexandernanberg.com)<br />[💻](https://github.com/kentcdodds/kcd-scripts/commits?author=alexandernanberg "Code") | [<img src="https://avatars2.githubusercontent.com/u/7818365?v=4" width="100px;"/><br /><sub><b>Alex Liang</b></sub>](https://github.com/fobbyal)<br />[💻](https://github.com/kentcdodds/kcd-scripts/commits?author=fobbyal "Code") |

<!-- ALL-CONTRIBUTORS-LIST:END -->

Expand Down
7 changes: 5 additions & 2 deletions src/config/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,11 @@ const output = [
},
]

const useBuiltinConfig = !hasFile('.babelrc') && !hasFile('.babelrc.js') && !hasPkgProp('babel')
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you update this to allow for the babel.config.js as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh sorry, I didn't catch that. I am not really a rollback user exactly. I am copying kcd-scripts to make something that feels more natural to me. Thanks for all the effort you put into the community!!!

const useBuiltinConfig =
!hasFile('.babelrc') &&
!hasFile('.babelrc.js') &&
!hasFile('babel.config.js') &&
!hasPkgProp('babel')
const babelPresets = useBuiltinConfig ? [here('../config/babelrc.js')] : []

const replacements = Object.entries(
Expand Down Expand Up @@ -143,7 +147,6 @@ module.exports = {
commonjs({include: 'node_modules/**'}),
json(),
rollupBabel({
exclude: 'node_modules/**',
presets: babelPresets,
babelrc: !useBuiltinConfig,
runtimeHelpers: useBuiltinConfig,
Expand Down
6 changes: 5 additions & 1 deletion src/scripts/build/babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ const args = process.argv.slice(2)
const here = p => path.join(__dirname, p)

const useBuiltinConfig =
!args.includes('--presets') && !hasFile('.babelrc') && !hasFile('.babelrc.js') && !hasPkgProp('babel')
!args.includes('--presets') &&
!hasFile('.babelrc') &&
!hasFile('.babelrc.js') &&
!hasFile('babel.config.js') &&
!hasPkgProp('babel')
const config = useBuiltinConfig
? ['--presets', here('../../config/babelrc.js')]
: []
Expand Down