cloverfield-tools / cloverfield

A next generation JavaScript boilerplate scaffolding tool.
MIT License
142 stars 8 forks source link

What tech should we use? #6

Closed ericelliott closed 9 years ago

ericelliott commented 9 years ago

ES 2015 (was ES6)

Since this is a next-gen tool, I think it makes sense to write it with next-gen JavaScript. We'll use ES6 + babel. To contribute, you'll want to make sure you're set up to compile ES6 on Node:

$ npm install -g babel

We'll use ESLint for our modern linting needs. =)

Libs

emenoh commented 9 years ago

I don't have any an opinion on libraries but here's my list of needs.

oh and Underscore.js

emenoh commented 9 years ago

More

ericelliott commented 9 years ago

Great checklist, thanks!

mattdesl commented 9 years ago

My thoughts working with many modules:

Here's what I want in tooling. This is more specific to modules than "big apps" so it may be outside the scope of Cloverfield.

EDIT: BTW, I went a little off-topic there.

Back to the original question. Is this "tech used in Cloverfield" or "tech exposed by Cloverfield"?

If we're talking tech exposed; I think if you start listing things out then you will inevitably end up as "another Yeoman" after a few months. Oh, it uses Browserify instead of Webpack... or Psshh RxJS was so last month, it's all about Bacon.js now!

ericelliott commented 9 years ago

less prompts, more command line flags. The prompts should be stuff like "module description" rather than "Which of these obscure and application-specific dependencies do you want to install?" (which of course the answer is almost always "None")

Yeah, I think the right approach is to offer both. If we have enough info to run a valid action, just run it without the options. If there are required fields missing, prompt for those required fields interactively. For every option available, make sure there's a CLI command to invoke them.

That way, if you forget the requirements for a command, you can just try to run it without, and you'll be reminded what the options are and prompted for the required options. I've seen something that works a lot like that, and it presented the smoothest CLI I've ever worked with. =)

a way to "snapshot" a folder or GitHub repo of templates and alias it to a certain name

Great idea! =)

There are some great resources in that maintenance-modules list. Thanks for the link!

ericelliott commented 9 years ago

@mattdesl posted in the task running thread:

standard for config-less style linting testling or smokestack for running TAP in a browser

I like the idea of config-less style linting, but that "standard" is really promoting an alternative, semi-colon free style which is far from idiomatic, and lacks some of the checks I'd normally want to enforce, so while I love the idea of a standard config-free lint, that's not the one I'd pick. I'm currently experimenting with an eslint config that I'll offer as an option. If people want "standard", they can manually install it.

I'm not going to shove semi-colon free style down people's throats, considering that it has been a hotly debated topic.

I'm definitely down with promoting a semi-colon free ESLint config, so maybe the only choice people will have to make is "with semicolons" or "without semicolons". We can start by defaulting to "with" and change the default to "without" after we've really put the lint tool through its paces and see how well it holds up in the wild under production stress tests.

I'm definitely down with testling or smokestack for unit tests in the browser, but for GUI web-apps that lots of people produce, we also need real functional tests that we can run on platforms like Sauce Labs.

Testing is such a deep topic we have a thread dedicated to it

kitten commented 9 years ago

My ideas to what I'd like to see in a next-gen scaffolding generator:

joeybaker commented 9 years ago

I'd shy away from forcing specific tech that doesn't have to do with "code standards". IMHO good tech to standardize on:

FWIW, here's my current setup: https://github.com/joeybaker/generator-iojs

Notable things that I think are important for js projects:

ericelliott commented 9 years ago

@joeybaker Awesome contribution, thank you!

joeybaker commented 9 years ago

@ericelliott my pleasure! FWIW, I really like what my template gives me, I just dislike using yeoman. I'd be happy to help here if the goal is to have a yeoman-- :)

ericelliott commented 9 years ago

@philplckthun

We almost certainly will have generators for dealing with tests, styles, and compiling for cross-browser and Node isomorphic code from ES6.

We probably don't need a generator specifically for Immutable.js or Flux, but we're already hard at work on a boilerplate for an isomorphic app using Express and React.

It will not use Flux for data. Instead, it will use object-list which in turn will depend on Immutable.js and RxJS for under-the-hood implementation.

The advantage of using object-list is that you'll be able to back it using an in-memory Array-based db (currently working), a Siren-Resource endpoint (in progress), MongoDB, Redis, etc...

In other words, a single interface to work with all kinds of data sources, that you can plug directly into React. It's immutable, and whenever possible will rely on lazy evaluation for maximally efficient object queries.

One of the inspirations for object-list was Meteor's "database everywhere" mantra for isomorphic data management. We believe we can take that a step further: "data everywhere", and that data can come from anywhere, too. Server Sent Event streams, browser events, Socket connections, JSON API's, etc...

Why not manage it all with a single, very capable API? One that's lean and modular enough to send the minimum code necessary for your app to work in the browser (mobile-friendly).

Anyway, the details of all that are way beyond the scope of this project.

Cloverfield is just a simple scaffolding / CLI utility belt for JS projects. It doesn't need to worry about any of that stuff. ;)

bengarnett commented 9 years ago

Only addition i didn't see above is proxying (local dev pointed at mocks or external server api)

lewiscowper commented 9 years ago

I think an important tool to take into consideration is semantic-release by @boennemann.