diff --git a/.all-contributorsrc b/.all-contributorsrc index 501b968..c15cb88 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -379,6 +379,15 @@ "bug", "code" ] + }, + { + "login": "onlywei", + "name": "Wei Wang", + "avatar_url": "https://avatars2.githubusercontent.com/u/1470998?v=4", + "profile": "https://github.com/onlywei", + "contributions": [ + "code" + ] } ], "repoType": "github" diff --git a/README.md b/README.md index 167f1d4..78650ec 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ All the benefits of npm scripts without the cost of a bloated package.json and l [![downloads][downloads-badge]][npm-stat] [![MIT License][license-badge]][LICENSE] -[![All Contributors](https://img.shields.io/badge/all_contributors-37-orange.svg?style=flat-square)](#contributors) +[![All Contributors](https://img.shields.io/badge/all_contributors-38-orange.svg?style=flat-square)](#contributors) [![PRs Welcome][prs-badge]][prs] [![Donate][donate-badge]][donate] [![Code of Conduct][coc-badge]][coc] @@ -484,13 +484,13 @@ Thanks goes to these people ([emoji key][emojis]): -| [
Kent C. Dodds](http://kent.doddsfamily.us)
[💻](/kentcdodds/p-s/commits?author=kentcdodds "Code") [📖](/kentcdodds/p-s/commits?author=kentcdodds "Documentation") [🚇](#infra-kentcdodds "Infrastructure (Hosting, Build-Tools, etc)") [💡](#example-kentcdodds "Examples") [📹](#video-kentcdodds "Videos") [👀](#review-kentcdodds "Reviewed Pull Requests") | [
David Wells](http://davidwells.io)
[💻](/kentcdodds/p-s/commits?author=DavidWells "Code") | [
Abhishek Shende](https://twitter.com/abhishekisnot)
[💻](/kentcdodds/p-s/commits?author=abhishekisnot "Code") [⚠️](/kentcdodds/p-s/commits?author=abhishekisnot "Tests") | [
Rowan Oulton](http://travelog.io)
[💻](/kentcdodds/p-s/commits?author=rowanoulton "Code") [📖](/kentcdodds/p-s/commits?author=rowanoulton "Documentation") [⚠️](/kentcdodds/p-s/commits?author=rowanoulton "Tests") | [
Gilad Goldberg](https://github.com/giladgo)
[💻](/kentcdodds/p-s/commits?author=giladgo "Code") | [
Tim McGee](https://github.com/tim-mcgee)
[💻](/kentcdodds/p-s/commits?author=tim-mcgee "Code") [📖](/kentcdodds/p-s/commits?author=tim-mcgee "Documentation") | [
Nik Butenko](http://butenko.me)
[💡](#example-nkbt "Examples") [💻](/kentcdodds/p-s/commits?author=nkbt "Code") | +| [
Kent C. Dodds](http://kent.doddsfamily.us)
[💻](https://github.com/kentcdodds/p-s/commits?author=kentcdodds "Code") [📖](https://github.com/kentcdodds/p-s/commits?author=kentcdodds "Documentation") [🚇](#infra-kentcdodds "Infrastructure (Hosting, Build-Tools, etc)") [💡](#example-kentcdodds "Examples") [📹](#video-kentcdodds "Videos") [👀](#review-kentcdodds "Reviewed Pull Requests") | [
David Wells](http://davidwells.io)
[💻](https://github.com/kentcdodds/p-s/commits?author=DavidWells "Code") | [
Abhishek Shende](https://twitter.com/abhishekisnot)
[💻](https://github.com/kentcdodds/p-s/commits?author=abhishekisnot "Code") [⚠️](https://github.com/kentcdodds/p-s/commits?author=abhishekisnot "Tests") | [
Rowan Oulton](http://travelog.io)
[💻](https://github.com/kentcdodds/p-s/commits?author=rowanoulton "Code") [📖](https://github.com/kentcdodds/p-s/commits?author=rowanoulton "Documentation") [⚠️](https://github.com/kentcdodds/p-s/commits?author=rowanoulton "Tests") | [
Gilad Goldberg](https://github.com/giladgo)
[💻](https://github.com/kentcdodds/p-s/commits?author=giladgo "Code") | [
Tim McGee](https://github.com/tim-mcgee)
[💻](https://github.com/kentcdodds/p-s/commits?author=tim-mcgee "Code") [📖](https://github.com/kentcdodds/p-s/commits?author=tim-mcgee "Documentation") | [
Nik Butenko](http://butenko.me)
[💡](#example-nkbt "Examples") [💻](https://github.com/kentcdodds/p-s/commits?author=nkbt "Code") | | :---: | :---: | :---: | :---: | :---: | :---: | :---: | -| [
Tommy](http://www.tommyleunen.com)
[🐛](/kentcdodds/p-s/issues?q=author%3Atleunen "Bug reports") [💻](/kentcdodds/p-s/commits?author=tleunen "Code") [⚠️](/kentcdodds/p-s/commits?author=tleunen "Tests") [👀](#review-tleunen "Reviewed Pull Requests") | [
Jayson Harshbarger](http://www.hypercubed.com)
[💡](#example-Hypercubed "Examples") [👀](#review-Hypercubed "Reviewed Pull Requests") | [
JD Isaacks](http://www.jisaacks.com)
[💻](/kentcdodds/p-s/commits?author=jisaacks "Code") [⚠️](/kentcdodds/p-s/commits?author=jisaacks "Tests") | [
Christopher Hiller](https://boneskull.com)
[👀](#review-boneskull "Reviewed Pull Requests") [🐛](/kentcdodds/p-s/issues?q=author%3Aboneskull "Bug reports") [💻](/kentcdodds/p-s/commits?author=boneskull "Code") [📖](/kentcdodds/p-s/commits?author=boneskull "Documentation") [⚠️](/kentcdodds/p-s/commits?author=boneskull "Tests") | [
Robin Malfait](https://robinmalfait.com)
[💡](#example-RobinMalfait "Examples") | [
Eric McCormick](https://ericmccormick.io)
[👀](#review-edm00se "Reviewed Pull Requests") [📖](/kentcdodds/p-s/commits?author=edm00se "Documentation") | [
Sam Verschueren](https://twitter.com/SamVerschueren)
[👀](#review-SamVerschueren "Reviewed Pull Requests") | -| [
Sorin Muntean](https://github.com/sxn)
[💻](/kentcdodds/p-s/commits?author=sxn "Code") [⚠️](/kentcdodds/p-s/commits?author=sxn "Tests") [📖](/kentcdodds/p-s/commits?author=sxn "Documentation") | [
Keith Gunn](https://github.com/gunnx)
[🐛](/kentcdodds/p-s/issues?q=author%3Agunnx "Bug reports") [💻](/kentcdodds/p-s/commits?author=gunnx "Code") [⚠️](/kentcdodds/p-s/commits?author=gunnx "Tests") | [
Joe Martella](http://martellaj.github.io)
[🐛](/kentcdodds/p-s/issues?q=author%3Amartellaj "Bug reports") [💻](/kentcdodds/p-s/commits?author=martellaj "Code") [⚠️](/kentcdodds/p-s/commits?author=martellaj "Tests") | [
Martin Segado](https://github.com/msegado)
[📖](/kentcdodds/p-s/commits?author=msegado "Documentation") | [
Bram Borggreve](http://colmena.io/)
[🐛](/kentcdodds/p-s/issues?q=author%3Abeeman "Bug reports") [💻](/kentcdodds/p-s/commits?author=beeman "Code") | [
Elijah Manor](http://elijahmanor.com)
[📹](#video-elijahmanor "Videos") | [
Ragu Ramaswamy](https://github.com/rrag)
[💻](/kentcdodds/p-s/commits?author=rrag "Code") [⚠️](/kentcdodds/p-s/commits?author=rrag "Tests") [🐛](/kentcdodds/p-s/issues?q=author%3Arrag "Bug reports") | -| [
Erik Fox](http://www.erikfox.co/)
[🐛](/kentcdodds/p-s/issues?q=author%3Aerikfox "Bug reports") [💻](/kentcdodds/p-s/commits?author=erikfox "Code") [📖](/kentcdodds/p-s/commits?author=erikfox "Documentation") [⚠️](/kentcdodds/p-s/commits?author=erikfox "Tests") | [
Aditya Pratap Singh](http://blog.adityapsingh.com)
[👀](#review-addityasingh "Reviewed Pull Requests") | [
bumbleblym](https://github.com/bumbleblym)
[💻](/kentcdodds/p-s/commits?author=bumbleblym "Code") [📖](/kentcdodds/p-s/commits?author=bumbleblym "Documentation") | [
Islam Attrash](https://twitter.com/IslamAttrash)
[💻](/kentcdodds/p-s/commits?author=Attrash-Islam "Code") | [
JasonSooter](https://github.com/JasonSooter)
[📖](/kentcdodds/p-s/commits?author=JasonSooter "Documentation") | [
Nate Cavanaugh](http://alterform.com)
[💻](/kentcdodds/p-s/commits?author=natecavanaugh "Code") | [
Wissam Abirached](https://designingforscale.com)
[💻](/kentcdodds/p-s/commits?author=wabirached "Code") [⚠️](/kentcdodds/p-s/commits?author=wabirached "Tests") | -| [
Paweł Mikołajczyk](https://github.com/Miklet)
[💻](/kentcdodds/p-s/commits?author=Miklet "Code") [⚠️](/kentcdodds/p-s/commits?author=Miklet "Tests") | [
Kyle Welch](http://www.krwelch.com)
[💻](/kentcdodds/p-s/commits?author=kwelch "Code") [⚠️](/kentcdodds/p-s/commits?author=kwelch "Tests") | [
Lufty Wiranda](http://instagram.com/luftywiranda13)
[💻](/kentcdodds/p-s/commits?author=luftywiranda13 "Code") | [
Bhargav Ponnapalli](http://imbhargav5.com)
[💻](/kentcdodds/p-s/commits?author=imbhargav5 "Code") | [
falieson](https://github.com/Falieson)
[📖](/kentcdodds/p-s/commits?author=Falieson "Documentation") [🔧](#tool-Falieson "Tools") | [
Suhas Karanth](https://github.com/sudo-suhas)
[🐛](/kentcdodds/p-s/issues?q=author%3Asudo-suhas "Bug reports") [💻](/kentcdodds/p-s/commits?author=sudo-suhas "Code") | [
Eric Skram](http://www.ericskram.com)
[📖](/kentcdodds/p-s/commits?author=Vpr99 "Documentation") | -| [
Kether Saturnius](http://www.k3th3r.com)
[💻](/kentcdodds/p-s/commits?author=iamkether "Code") [📖](/kentcdodds/p-s/commits?author=iamkether "Documentation") | [
Sviatoslav](https://github.com/SleepWalker)
[🐛](/kentcdodds/p-s/issues?q=author%3ASleepWalker "Bug reports") [💻](/kentcdodds/p-s/commits?author=SleepWalker "Code") | +| [
Tommy](http://www.tommyleunen.com)
[🐛](https://github.com/kentcdodds/p-s/issues?q=author%3Atleunen "Bug reports") [💻](https://github.com/kentcdodds/p-s/commits?author=tleunen "Code") [⚠️](https://github.com/kentcdodds/p-s/commits?author=tleunen "Tests") [👀](#review-tleunen "Reviewed Pull Requests") | [
Jayson Harshbarger](http://www.hypercubed.com)
[💡](#example-Hypercubed "Examples") [👀](#review-Hypercubed "Reviewed Pull Requests") | [
JD Isaacks](http://www.jisaacks.com)
[💻](https://github.com/kentcdodds/p-s/commits?author=jisaacks "Code") [⚠️](https://github.com/kentcdodds/p-s/commits?author=jisaacks "Tests") | [
Christopher Hiller](https://boneskull.com)
[👀](#review-boneskull "Reviewed Pull Requests") [🐛](https://github.com/kentcdodds/p-s/issues?q=author%3Aboneskull "Bug reports") [💻](https://github.com/kentcdodds/p-s/commits?author=boneskull "Code") [📖](https://github.com/kentcdodds/p-s/commits?author=boneskull "Documentation") [⚠️](https://github.com/kentcdodds/p-s/commits?author=boneskull "Tests") | [
Robin Malfait](https://robinmalfait.com)
[💡](#example-RobinMalfait "Examples") | [
Eric McCormick](https://ericmccormick.io)
[👀](#review-edm00se "Reviewed Pull Requests") [📖](https://github.com/kentcdodds/p-s/commits?author=edm00se "Documentation") | [
Sam Verschueren](https://twitter.com/SamVerschueren)
[👀](#review-SamVerschueren "Reviewed Pull Requests") | +| [
Sorin Muntean](https://github.com/sxn)
[💻](https://github.com/kentcdodds/p-s/commits?author=sxn "Code") [⚠️](https://github.com/kentcdodds/p-s/commits?author=sxn "Tests") [📖](https://github.com/kentcdodds/p-s/commits?author=sxn "Documentation") | [
Keith Gunn](https://github.com/gunnx)
[🐛](https://github.com/kentcdodds/p-s/issues?q=author%3Agunnx "Bug reports") [💻](https://github.com/kentcdodds/p-s/commits?author=gunnx "Code") [⚠️](https://github.com/kentcdodds/p-s/commits?author=gunnx "Tests") | [
Joe Martella](http://martellaj.github.io)
[🐛](https://github.com/kentcdodds/p-s/issues?q=author%3Amartellaj "Bug reports") [💻](https://github.com/kentcdodds/p-s/commits?author=martellaj "Code") [⚠️](https://github.com/kentcdodds/p-s/commits?author=martellaj "Tests") | [
Martin Segado](https://github.com/msegado)
[📖](https://github.com/kentcdodds/p-s/commits?author=msegado "Documentation") | [
Bram Borggreve](http://colmena.io/)
[🐛](https://github.com/kentcdodds/p-s/issues?q=author%3Abeeman "Bug reports") [💻](https://github.com/kentcdodds/p-s/commits?author=beeman "Code") | [
Elijah Manor](http://elijahmanor.com)
[📹](#video-elijahmanor "Videos") | [
Ragu Ramaswamy](https://github.com/rrag)
[💻](https://github.com/kentcdodds/p-s/commits?author=rrag "Code") [⚠️](https://github.com/kentcdodds/p-s/commits?author=rrag "Tests") [🐛](https://github.com/kentcdodds/p-s/issues?q=author%3Arrag "Bug reports") | +| [
Erik Fox](http://www.erikfox.co/)
[🐛](https://github.com/kentcdodds/p-s/issues?q=author%3Aerikfox "Bug reports") [💻](https://github.com/kentcdodds/p-s/commits?author=erikfox "Code") [📖](https://github.com/kentcdodds/p-s/commits?author=erikfox "Documentation") [⚠️](https://github.com/kentcdodds/p-s/commits?author=erikfox "Tests") | [
Aditya Pratap Singh](http://blog.adityapsingh.com)
[👀](#review-addityasingh "Reviewed Pull Requests") | [
bumbleblym](https://github.com/bumbleblym)
[💻](https://github.com/kentcdodds/p-s/commits?author=bumbleblym "Code") [📖](https://github.com/kentcdodds/p-s/commits?author=bumbleblym "Documentation") | [
Islam Attrash](https://twitter.com/IslamAttrash)
[💻](https://github.com/kentcdodds/p-s/commits?author=Attrash-Islam "Code") | [
JasonSooter](https://github.com/JasonSooter)
[📖](https://github.com/kentcdodds/p-s/commits?author=JasonSooter "Documentation") | [
Nate Cavanaugh](http://alterform.com)
[💻](https://github.com/kentcdodds/p-s/commits?author=natecavanaugh "Code") | [
Wissam Abirached](https://designingforscale.com)
[💻](https://github.com/kentcdodds/p-s/commits?author=wabirached "Code") [⚠️](https://github.com/kentcdodds/p-s/commits?author=wabirached "Tests") | +| [
Paweł Mikołajczyk](https://github.com/Miklet)
[💻](https://github.com/kentcdodds/p-s/commits?author=Miklet "Code") [⚠️](https://github.com/kentcdodds/p-s/commits?author=Miklet "Tests") | [
Kyle Welch](http://www.krwelch.com)
[💻](https://github.com/kentcdodds/p-s/commits?author=kwelch "Code") [⚠️](https://github.com/kentcdodds/p-s/commits?author=kwelch "Tests") | [
Lufty Wiranda](http://instagram.com/luftywiranda13)
[💻](https://github.com/kentcdodds/p-s/commits?author=luftywiranda13 "Code") | [
Bhargav Ponnapalli](http://imbhargav5.com)
[💻](https://github.com/kentcdodds/p-s/commits?author=imbhargav5 "Code") | [
falieson](https://github.com/Falieson)
[📖](https://github.com/kentcdodds/p-s/commits?author=Falieson "Documentation") [🔧](#tool-Falieson "Tools") | [
Suhas Karanth](https://github.com/sudo-suhas)
[🐛](https://github.com/kentcdodds/p-s/issues?q=author%3Asudo-suhas "Bug reports") [💻](https://github.com/kentcdodds/p-s/commits?author=sudo-suhas "Code") | [
Eric Skram](http://www.ericskram.com)
[📖](https://github.com/kentcdodds/p-s/commits?author=Vpr99 "Documentation") | +| [
Kether Saturnius](http://www.k3th3r.com)
[💻](https://github.com/kentcdodds/p-s/commits?author=iamkether "Code") [📖](https://github.com/kentcdodds/p-s/commits?author=iamkether "Documentation") | [
Sviatoslav](https://github.com/SleepWalker)
[🐛](https://github.com/kentcdodds/p-s/issues?q=author%3ASleepWalker "Bug reports") [💻](https://github.com/kentcdodds/p-s/commits?author=SleepWalker "Code") | [
Wei Wang](https://github.com/onlywei)
[💻](https://github.com/kentcdodds/p-s/commits?author=onlywei "Code") | This project follows the [all-contributors][all-contributors] specification. diff --git a/src/bin-utils/index.js b/src/bin-utils/index.js index 6e959d0..a4b2ea9 100644 --- a/src/bin-utils/index.js +++ b/src/bin-utils/index.js @@ -66,7 +66,7 @@ const loadJSConfig = getAttemptModuleRequireFn(function onFail( // eslint-disable-next-line complexity function loadConfig(configPath, input) { let config - if (configPath.endsWith('.yml')) { + if (configPath.endsWith('.yml') || configPath.endsWith('.yaml')) { config = loadYAMLConfig(configPath) } else { config = loadJSConfig(configPath) diff --git a/src/bin-utils/parser.js b/src/bin-utils/parser.js index dfee4a5..f86f3f4 100644 --- a/src/bin-utils/parser.js +++ b/src/bin-utils/parser.js @@ -248,7 +248,9 @@ function parse(rawArgv) { return config } return ( - findUp.sync('package-scripts.js') || findUp.sync('package-scripts.yml') + findUp.sync('package-scripts.js') || + findUp.sync('package-scripts.yml') || + findUp.sync('package-scripts.yaml') ) } }