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

meta-project

v2.5.0

Published

project plugin for meta

Downloads

7,133

Readme

Build Status

meta-project

project plugin for meta

Usage

  Usage: meta project [<options>] <command>


  Commands:

    create      create and initialize a new child repository
    import      import an existing child repository via git clone
    migrate     migrate from a monorepo to a metarepo
    help <cmd>  display help for <cmd>

  Options:

    -h, --help  output usage information

Creating a new project

To create a new project, use meta project create <folder> <repo url>

meta project create new-dir [email protected]/org/repo

Import an existing project

To import an existing project, use meta project import <folder> [<repo url>]

meta project import projects/example [email protected]/your-org/example

To import existing project which is already checked out at <folder>, <repo-url> can be omitted

meta project import projects/example

Migrate a Monorepo to a metarepo and keep your git history intact.

'meta project migrate' helps you move from a monorepo to a meta repo by moving directories from your existing repo into separate child repos, with git history intact. These are then referenced in your '.meta' file and cloned, making the operation transparent to your codebase.

For example, given the following monorepo structure:

- monorepo-base
  - project-a
  - project-b
  - project-c

Create git repos for project-a, project-b, and project-c, then run:

cd monorepo-base
meta init
meta project migrate project-a [email protected]/yourorg/project-a
meta project migrate project-b [email protected]/yourorg/project-b
meta project migrate project-c [email protected]/yourorg/project-c

This will keep the git history of each subproject in tact, using some git magic:

  • Explanation: https://help.github.com/en/articles/splitting-a-subfolder-out-into-a-new-repository
  • Implementation: https://github.com/mateodelnorte/meta-project/blob/master/lib/splitSubtree.js

How it works

A) Migrate will first create a copy of your project in a temporary directory and replace the remote 'origin' with the provided

B) It will split the history from and push to the provided : https://help.github.com/en/articles/splitting-a-subfolder-out-into-a-new-repository

C) Next is removed from your monorepo, and then cloned back into the same location.

In the eyes of the monorepo, the only thing that has changed is the .meta file, however, now also has it's own distinct history.

Migration Phase

If you need the monorepos structure to stay in tact for any extended duration, such as supporting legacy CI systems, you can stop here.

While in this 'migration' phase, you need to commit to the child directory's git history as well as the monorepo's git history. These commits can literally be made twice by cd-ing around or both can be made at once using 'meta git commit'.

Finishing the Migration

When the monorepo no longer needs to be maintained you can simply add the migrated project to your '.gitignore'.

This will cause changes to only be tracked in the child repo, rather than both, such as during the migration phase.