-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CLI could initialize the scaffolding for releasing React libs #9
Comments
100% agree, I think things should be setup with Flow, eslint and such as it's a good thing to recommend. Tools like this should be the minimum in projects right now. Not to complicate things more than they need to be. One thing I don't like about What I imagine for that is to have a separate repo, have it be a monorepo maybe and the name of the directory is the name of the template so you could You can always take my "grand ideas" with a grain of salt too, no hurt feelings from me :) |
I'm thinking maybe we have a modus-cli.json file that describes the possible setups. The json file would have key like "default", or "ionic", or "react", and so on. The values would be an array of objects, each defining subdirectories in various repos (like guidelines) to fetch and which to ignore in those, as well as CLI like commands to execute (such as "download and rename README.sample.md to README.md if it doesn't exist"). So the command would be something like: modus-cli (does default/guidlines) Thoughts? |
I should mention that I really don't like JSON configuration files... I'd much rather we use a .js file that just exports the same object that would be expressed in JSON. The reason? You can comment a .js file. And comment out lines. |
And programmatically return an object (think diff envs). Even if it's just |
I agree with Also, IMO, I would love to see
|
^^^ In addition to Or we could do |
yeah. that's why I prefixed with |
This is a fairly significant refactoring of the program. I'm up for it, but I want to make it known. init and update in the examples below would be plugins still, I guess.
and
Are there any other "commands" we want aside from init and update? We could do some git stuff, to make things handy. Like:
etc. |
|
Worked on this a bunch, but I ultimately came down to one question. Why not just git fork a template we make vs. using this tool? |
Here's how I see cli over fork:
Anything else? |
I'm looking at "opinionated" repos. You need different opinions for NodeJS, for React, for React+Redux, React+Mobx, React+anything+flow, Typescript, angular, ionic, C, C++, shell scripts, AdonisJS, and so on. Using webpack, babel, eslint and/or prettify, tslint, etc. The complexity of incrementally adding .*rc files, editing package.json (if there is one), etc., becomes ridiculous. To get rid of history after a fork or clone, This tool is fine at downloading/overwriting/backup copy of files in a branch - it can be ANY repo, any branch. So I you want to update files in a non-repo from a repo, not a problem. That is, if you fork super-duper-react-template repo, and get rid of .git, you can still However, if you are syncing with an upstream repo (e.g. fork), you can simply do At some point, we're duplicating (without being as complete) what git already does. See? |
Blocker nodegit/nodegit#1490 |
I have looked at every node+git module and this one appears to be the one we need. The others simply are insufficient. A particular issue is that GitHub does not support git archive, GitHub API is not portable to other git repository sources, and I do not believe it a good idea to clone repos just to get a listing of the files within. Using git archive is bad enough, but at least you don't have to actually save the whole repo to disk somewhere (you can get a "listing" of the zip contents to get files/dirs). For sure, our "Git" API should support local repos. So you can work on a template locally and use modus-cli to test it out - without having to commit/push each edit. |
Description
Releasing open source React components requires heavy scaffolding. Once we are done with tests, CI, and examples for react-idle, we could use that setup for other similar projects
React Idle setup is somewhat opinionated but to a reasonable degree. For instance:
eslint
andprettier
should stay there, but tweaks are possiblerollup
is used overwebpack
, which may introduce a learning curve. Still,rollup
has certain advantages for libraries, which was also heavily researched by React teamThis may require a separate repo. It would be interesting to create something like
create-react-app
so it can be maintained from one placeThe text was updated successfully, but these errors were encountered: