Open imlucas opened 9 years ago
Should you have to pick a buddy to be your co-maintainer when creating a new module or is that just getting in the way?
Existing khaos templates:
List of potential templates we would want:
empty: an empty directory structure with the bare minimum to qualify as mongodb-js cli: command-line interface app with docopt, like "mj". view: an ampersand view module, e.g. a subview for a larger app (object-tree, minicharts, ...) spa: single-page application, running entirely in a browser (wtstats, kaleido, ...) full: full client/server app (e.g. scout, dashboards, ...) shell: a mongo shell plugin with automatic registration util: a utility function, template or code snippet (mixins, etc), how is that different to empty though? doc: a non-code document, spec or documentation
Dependency graph looks like this:
The templates should build on top of each other, not duplicate features. I.e. if you want a "spa" app, mj
will clone the "empty" template first, then on top the "view" template and finally the "spa" template. Templates can obviously overwrite existing files if necessary.
As per discussion on #2, consolidating the two tickets here and closing #2.
@imlucas, should mj create ...
set up all the remote stuff already? Wonder if it's better to have a separate command mj ingest
/ mj submit
or something. I often want to just play around with something and not trigger all these remote processes. I may not actually want to commit it in the end. Contributors might feel intimidated if simply cloning a template executes all these steps.
First time workflow could be:
mj create spa ./myOwnSpa
// work work work
git commit -a
mj submit // this step sets up github repo, remote branch, travis etc. and does a git push
From then on, simply (as usual):
// work work work
git commit -a
git push
Thoughts?
With a switch on create for powerusers to do it all in one step...
mj create --submit spa ./myOwnSpa
Progress on branch 4-templates.
templates are under ./templates/{{name}}
. First template empty
added from https://github.com/mongodb-js/khaos-node. Slight modifications and fixes added.
Run mj create empty ./somedir
to create the project.
mj submit
@rueckstiess it should just set everything up automatically or else it will never happen. it's all just important plumbing.
Further discussion on #16 and in Flowdock: We're splitting into create
and submit
and see how that goes. Can add switch mj create --submit
that does both in one step, similar to git commit -a
stages and commits in one step for convenience, a.k.a "I know what I'm doing".
@rueckstiess :heart:
mj create
should do all of the following:git init
npm install
git commit -a {\.j*,\.g*,\.t*,\.z*,\.n*,*} -m "Initial commit"
moved below steps to
mj submit
#16gh repo --new {{name}} --organization mongodb-js --description "{{description}}" --homepage "https://github.com/mongodb-js/{{name}}"
(create repo)git remote add origin git@github.com:mongodb-js/{{name}}.git
travisjs encrypt SAUCE_USERNAME=mongodb-js -r mongodb-js/{{name}} --add;
travisjs encrypt SAUCE_ACCESS_KEY=<how to get sauce api key?!?!?!> -r mongodb-js/{{name}} --add;
travisjs hook
(syncs + adds repo)git remote add origin git@github.com:imlucas/khaos-amp-example.git
git push origin master
Templates
module: a no frills node.js module +khaos-node./bin/{{name}}.js
(all modules should expose at least 1 bin)spa: single page application that renders in the browserkhaos-spagit
,npm
,surge
)atom: an application that runs in atom-shellsee "spa" or "full" below.amp: an ampersand.js extensionkhaos-amp