So, I am working on a shiny, new upgrade for the current MERN-CLI. The following are the features I am working on right now:
I am thinking about making it like the RoR CLI. What are your suggestions?
Here is another shiny new Node.js library trying to help build microservices. hashnode.com/post/aquajs-or-a-nodejs-framework-ci…
I am sharing this because of the CLI. It's globally installed (unfortunately) but has some good commands.
I'm the typical backend guy, so I'm all about routes, models, and logic.
That said, the real big wish I have is that this scaffolding/cli tool not become a required tool (remembering RoR). Loopback's yeoman-based scaffolding does this well as it isn't a requirement but can be a good crutch getting things laid out at the start (really fast prototyping); and doesn't become a major annoyance down the road as the codebase grows in size, complexity (and team).
Found a good post about not installing something globally spin.atomicobject.com/2016/02/22/npm-install-dang…
I like all the ideas popping up here.
Let me throw mine into the ring as well. I would split mern into multiple small tools.
Tools like app add test
app
mern app rethink-thinky-router5 or manually npm i -D mern-preset-rethink-thinky-router5 to install RethinkDB, Thinky (orm), Router5 (react-router alternative)mern app hapi-redux-router or manually npm i -D mern-preset-hapi-redux-router to install Hapi and redux-simple-router (instead of react-router)add
mern add container my_container <childs list> --decorator I guess this will be tricky, but why not having next level goals?mern add stateless my_function --noJSX Will generate a stateless component using vanilla JavaScript over JSXmern add my_code --npm mern-generator-<name> Maybe some code doesn't fit well into a snippet; let it be maintained outside.test
Considering global and non-global installations. For beginners, a global mern installation could ease things up. Others (like me) may like to go mkdir name && cd name and then run npm init && npm i D mern-cli && mern app rethink-thinky-router5 :-P
Maybe a writing up a road map first for this would be awesome - defining what features would be core to scaffolding a project, and what would be opinionated and project specific.
I am coming from a front-end perfective, and getting a configuration set up for asset pipe line, css preprocessing, image optimisation, and authoring & linting is as important as is it repetitive.
I am currently in a PR that will introduce stylus/less/sass(sass-node) support, but it got me thinking: should these options be a part of the mern init. Like, mern --css stylus - which would also introduce a .stylintrc and stylint-loader.
Good idea. Right now the CLI doesn't do much apart from cloning the starter project. So, it's good to prepare a roadmap and improve this. I have a few ideas :
--useLifeCycle should create components with lifecycle methodsI'll update this list as I think of new ideas. How about taking some inspirations from ember-cli?
@athomann I saw your WIP PR. You said you were going to fork ember-cli and model off that. How was your experience?
@prank7 @mayank @beaucharman @fibric @Kleo Thoughts?
Prashant Abhishek
Co-founder at AltCampus
Jeff Papineau
Hangin in SV
Front-end perspective: