Code Monkey home page Code Monkey logo

rungex's Introduction

yarn-plugin-rungex

All Contributors

Release

A Yarn Berry plugin that can be used to run multiple package.json scripts with Regex.

Install

yarn plugin import https://raw.githubusercontent.com/krshnpatel/rungex/main/bundles/@yarnpkg/plugin-rungex.js

Usage

yarn rungex [-c,--ci] [-p,--parallel] [-sw,--starts-with] [-ew,--ends-with] <scriptMatcher>
yarn rungex --help

Examples

The following part of a package.json file will be used as a reference for all examples in this section:

{
    // ... other fields
    "scripts": {
        "build:dev": "build app dev",
        "build:prod": "build app prod",
        "lint": "eslint src/",
        "lint:fix": "eslint src/ --fix",
        "start": "start app",
        "start:dev": "start app dev",
        "taste": "run taste",
        "test:e2e": "run e2e tests",
        "test:integration": "run integration tests",
        "test:unit": "run unit tests",
        "update:local": "update local app"
    }
    // ... more fields
}

NOTE: By default, the rungex command will always prompt the user whether they want to run the matched scripts or not. However, the prompt can be skipped by passing in the -c or the --ci option.

Matching scripts

Run all scripts matching the Regex: "lint.*". The following command will match the "lint" and "lint:fix" scripts in the package.json above.

yarn rungex "lint.*"

Run all scripts that start with "test". The following commands will match the "test:unit", "test:integration", and "test:e2e" scripts.

yarn rungex "test" -sw
# OR
yarn rungex "test" --starts-with

Run all scripts that end with "dev". The following commands will match the "build:dev" and "start:dev" scripts.

yarn rungex "dev" -ew
# OR
yarn rungex "dev" --ends-with

Other options

NOTE: The following options can be used as standalone options or they can be combined with other options.

Run all matching scripts in parallel that start with "test". The following commands will match the "test:unit", "test:integration", and "test:e2e" scripts and then run them in parallel to each other if the user chooses to run the scripts.

yarn rungex "test" -p -sw
# OR
yarn rungex "test" --parallel --starts-with

Run all scripts in parallel without prompting the user for any input. The following commands will match the "build:dev" and "build:prod" scripts. Both of those scripts will be run in parallel without any user prompt.

yarn rungex "build" -c -p
# OR
yarn rungex "build" --ci --parallel

Uninstall

yarn plugin remove @yarnpkg/plugin-rungex

Contributors ✨

Krishan Patel
Krishan Patel

πŸš‡ πŸ’»

This project follows the all-contributors specification. Contributions of any kind welcome!

License

MIT

rungex's People

Contributors

krshnpatel avatar dependabot[bot] avatar allcontributors[bot] avatar

Stargazers

 avatar Mike M. Fleming avatar

Watchers

 avatar  avatar

rungex's Issues

The automated release is failing 🚨

🚨 The automated release from the main branch failed. 🚨

I recommend you give this issue a high priority, so other packages depending on you can benefit from your bug fixes and new features again.

You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can fix this πŸ’ͺ.

Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.

Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the main branch. You can also manually restart the failed CI job that runs semantic-release.

If you are not sure how to resolve this, here are some links that can help you:

If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.


Invalid npm token.

The npm token configured in the NPM_TOKEN environment variable must be a valid token allowing to publish to the registry https://registry.npmjs.org/.

If you are using Two Factor Authentication for your account, set its level to "Authorization only" in your account settings. semantic-release cannot publish with the default "
Authorization and writes" level.

Please make sure to set the NPM_TOKEN environment variable in your CI with the exact value of the npm token.


Good luck with your project ✨

Your semantic-release bot πŸ“¦πŸš€

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.