mateodelnorte / meta

tool for turning many repos into a meta repo. why choose many repos or a monolithic repo, when you can have both with a meta repo?

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Implement new plugin for node-gh

mikelax opened this issue · comments

As a user, I would like to use meta commands that wrap the node-gh app.

The main use case is interacting with pull requests, mainly list, merge, and rebase.

Love it. I can imagine typing meta gh issues list and having a well delineated list of issues for each repo in the meta repo printed out. meta gh pr would be great as well.

Interested in helping contribute? Happy to go over the simple patterns involved in making a plugin, and equally happy to split up the work.

yeah, that sounds good to me. Maybe we could split the work between you working on issues list and me working on gh pr.

went ahead and created a new repo to house the plugin here and added you as a collaborate. the initial skeleton is there, just need to fill in the commands.

the best way to get started is to do the following:

  • meta git clone git@github.com:mateodelnorte/meta.git
  • cd ./meta
  • meta npm install
  • meta npm link --all

you can then write your command and test using ./bin/meta git gh [subcommand]. happy to make you a contributor on any project you wanna help out with.

thanks, I'll poke around this repo to get started and see how I make out.

You might have to do a npm install meta-npm once your in the meta dir, above. That will add the meta npm subcommands, since they're context enabled (meaning the commands appear when you've installed the plugins locally).

I am having trouble getting the meta command to work.
So far I have done the following:

git clone git@github.com:mateodelnorte/meta.git
cd meta
npm i

I am confused on what to do next. How do I get the meta command to be installed on my path?
Also, I see all the projects listed in the .looprc file, do I have to manually check those out or will one of the meta commands take care of that?

Output from npm list:

Mike@Michaels-MBP:meta (master) $ npm list --depth=0
meta@1.0.17 /Users/Mike/git/meta/meta
├── commander@2.9.0 (git://github.com/mateodelnorte/commander.js.git#fc6c36465fde78f64a55c2ead53fe049838fdfdb)
├── cross-env@3.2.4
├── debug@2.6.3
├── lodash.union@4.6.0
├── meta-exec@0.0.2
├── meta-git@0.0.16
├── meta-init@0.0.1
├── meta-npm@0.0.13
├── meta-project@0.0.1
├── meta-yarn@0.0.0
└── tabtab@2.2.2

So, you're developing it locally. You've got a couple options.

You can reference your modified version of the code directly, [path to meta]/bin/meta.
You can install your current version globally meta> npm i -g ..
You can npm link your local version globally meta> npm link.

You probably just want to npm link it.

Btw, the best way to get all of meta on your system is not with git, it's with meta itself.

meta git clone git@github.com:mateodelnorte/meta.git # will clone meta and all child repos
cd ./meta 
npm i # install top level repo # will populate meta with plugin commands, like npm
meta npm install # will npm install top level and all child repos
meta npm link --all # will determine which projects use each other, then npm link them
npm link # will npm link meta globally, installing its bin files globally as well

meta git clone will get all the plugin repos as well.

Actually this may do it for you entirely:

meta git clone git@github.com:mateodelnorte/meta.git && cd ./meta && npm i && meta npm install && meta npm link --all && npm link

After that you should have all of meta's repos, they should all be installed and linked, and meta, itself, should be linked for global usage.

I get that I want to use meta to get everything initialized, but I feel like I have a chicken and egg situation.

ie. I want to run this command to bootstrap everything but I don't yet have a meta command installed

meta git clone git@github.com:mateodelnorte/meta.git && cd ./meta && npm i && meta npm install && meta npm link --all && npm link

It's ok to do it with meta installed globally before. You'll just end up in a situation where your global meta bin will be replaced with a symlink to your local install's bin.

When you're done developing locally, you just npm i -g meta again and everything is back to normal.

May need to npm unlink in the meta dir first.

nice, all good! 👍
I just had to remove this one plugin from the .meta file as it appears to be a stub project with no code so the meta npm link --all failed until I removed it.

"plugins/meta-gitbook": "git@github.com:mateodelnorte/meta-gitbook.git"

ah! yup. sorry. didn't mean to push that one. thanks!

Added in commit 8b34186

Hi, As a user trying to install meta, I'm struggeling to get the meta commands to work. I get:
"command not found: meta" - whenever I try to run something. What am I missing? :)

Thanks for the reply. Yes I'm able to run 'npm i -g meta' and it seems to work. But when I'm for example trying to run 'meta' or 'meta git clone...' I get : "command not found: meta"

Thanks! I'll look into that.