npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

setup-ci

v0.6.0

Published

Effortlessly generate GitHub workflows for the most popular CI tasks in your React Native project.

Downloads

45

Readme

🤔 Why?

The problem we noticed is that setting up CI is performed once, needs to be researched every time, and is often trial and error driven. The process is repetitive.

We created a tool that bootstraps CI with the most used features, which are ready for customization in the future. Running npx setup-ci generates GitHub workflows for the most popular CI tasks.

📖 Usage

Simply go to your project root directory and run:

npx setup-ci

then select the setup that matches your project - npx setup-ci generates workflows and tries to add missing configs and install necessary dependencies.

If your project has a monorepo structure, run the script from the root directory of the app for which you want to set up workflows.

[!WARNING] If you re-run npx setup-ci in the same project or already have some workflows set up manually, they might get overwritten. Therefore, we recommend running the script with no uncommitted changes, so you can easily inspect the diff after script execution.

💡 Demo

Say we want to set up GitHub actions that run Typescript and Prettier checks on our project every time we create or push to an existing Pull Request. Let's try to use npx setup-ci to do the heavy lifting and generate all the necessary configurations.

Alternatively, we can use flags --preset --ts --prettier to avoid the interactive survey at the beginning of the script. You can check the section below for more information about available flags!

⚙️ Features

  • Currently, only GitHub actions are supported as your CI.
  • npm and yarn are supported as package managers, and they will be detected automatically.
  • Monorepo structure is supported, but make sure you run the script from the app directory, not the monorepo root.

When using npx setup-ci, you can provide additional flags to modify its default behavior.

The following are feature flags that can be used with --preset flag (they are ignored if --preset is not provided).

🔐 Repository secrets

Some workflows generated by npx setup-ci require setting up repository secrets that can be then accessed by workflows as ${{ secrets.* }}. Make sure to read logs printed by the script as you will always be prompted to create secrets if necessary. The following table shows a summary of secrets you might have to create for generated workflows to work properly.

🔍 Troubleshooting

For known issues with npx setup-ci, please check Troubleshooting.

📊 Metrics

By default, npx setup-ci collects anonymous usage data that helps us improve the tool. You can disable it by using the --skip-telemetry option. Collected data consists of timestamp, tool version, selected options, whether the script has been run for the first time and whether it ended with an unexpected error (without stacktrace so that no sensitive PII can be accidentally leaked).

💬 Your feedback

[!IMPORTANT] If you have an issue using npx setup-ci, you can check Troubleshooting and Reported Bugs for a potential solution.

This tool is supposed to be helpful to as many developers as possible - and therefore we are open to your ideas and general feedback! If you want to share your opinion about npx setup-ci or have some thoughts about how it could be further developed, don't hesitate to create an issue or contact the maintainers directly.

🚸 Roadmap

  • [x] Build Expo DevClient when fingerprint changes
  • [x] Maestro support for E2E tests
  • [ ] Different workflows for different branches (ex. PR, main, release)
  • [ ] Upload source maps to Sentry
  • [ ] Handle different vendors

📋 License

npx setup-ci is licensed under The MIT License.

💸 Credits

This project has been built and is maintained thanks to the support from Software Mansion

swm

setup-ci is created by Software Mansion

Since 2012 Software Mansion is a software agency with experience in building web and mobile apps. We are Core React Native Contributors and experts in dealing with all kinds of React Native issues. We can help you build your next dream product – Hire us.