kraftvaerk / generator-rammevaerk

Scaffold a web project in kraftvaerk style
MIT License
5 stars 4 forks source link

More ES6 #29

Closed kristoforsalmin closed 6 years ago

kristoforsalmin commented 6 years ago

Hi @mi2oon,

I've noticed we have a bit of mismatch in the code. I guess, it mostly related to the ongoing ES5 to ES6 (I use ES6 as a collective term of all new things we support) transition.

So I would like to help and look at some parts of the codebase that might be potentially updated. Some examples:

Does it make sense? What do you think? πŸ˜„

Thanks


A side question πŸ˜„ , when you have something like that:

const del             = require('del');
const gulp            = require('gulp');
const gutil           = require('gulp-util');

How do you know how much space it needs to be between variable name and =? It varies from one file to another, so I can't really make a sense of it 😞

I used to see a style with the following logic behind:

const del  = require('del');
const gulp = require('gulp');

Then, at some point, a thing with relatevely long name comes, so:

const del                                = require('del');
const gulp                               = require('gulp');
const longerThanGulpSoMoveEverythingElse = require('best-one');
mi2oon commented 6 years ago

Hi @racse1,

Not to forget all this. I think you have great points all across the list. Even the opinionated one. I like the fact of keeping everything consistent. I don't know why using template string for me has always felt heavy for me. Perhaps it's just a underlying mental environmentalist trying to save a CPU cycle somewhere 🌲

As for the side question, well it's pure insanity at work 😁 I use to have a align plugin for sublime back in the days. That's where it is from. But you are right maintaining those spaces manually can drive you insane. Also then do we only do that alignment for top vars or all vars.

Anyway, I would probably drop this super alignment for the future 🌬