jaredreich / pell

📝 the simplest and smallest WYSIWYG text editor for web, with no dependencies
MIT License
11.96k stars 549 forks source link

Remove gulp, implement use of new es6 class syntax #43

Closed giacomocerquone closed 6 years ago

giacomocerquone commented 7 years ago

Hi, would you consider to remove gulp and use just plain npm scripts to lighten the project development too? And what do you think about using the new class syntax for this module?

NxtChg commented 7 years ago

Please, don't use ES6. There are still plenty of old browsers out there that don't support it, and the benefits of it over ES5 are superficial.

giacomocerquone commented 7 years ago

@NxtChg I just saw that in the readme he wrote that he's already using pure es6 js (of course, otherwise a package big just 1kb wouldn't be possible) But now that you let me think about it, typescript could be used to transpile to ES5/ES6

tunnckoCore commented 7 years ago

@giacomocerquone: of course, otherwise a package big just 1kb wouldn't be possible

It's not 1kb because of the ES6. Even in most cases transpiled es5 code is bigger than it can be, exactly because es6 transpilation process. There are plenty of technics to write small code.

Second. Using es6 class not make any sense here. Don't force people to hop on that train when it's absolutely not needed.

And third, it seems that he more like gulp for his flow, not modernish Webpack shitty shits. But Yea, here i can agree that npm scripts is mostly enough and when you need transpile can use Rollup, because it is from where everything of Tree Shaking started. Webpack does many things in wrong way - it's ACE is code splitting.

giacomocerquone commented 7 years ago
  1. Who talked about webpack and most importantly, why are you talking about webpack?
  2. It's because of ES6 too! There are no arrow function (which he uses) in ES5, there are no constants definition (that can lead to lighter source)
  3. For classes I agree with you, it was just an idea to consider
tunnckoCore commented 7 years ago
  1. Just mention it, because most may assume that when someone suggest to ditch gulp :d
  2. Yes, but both const and let are transpiled to same thing, so same bytes, no matter what you use in es6. As about that ES6 makes code more readable, i'm agree. But just my point is that ES6 dont leads to smaller es5.

For me, es6 is only good because the modules, currently, until we stop transpile for prod. When these times come, it would be awesome.

jaredreich commented 6 years ago

@giacomocerquone Thanks for the feedback, but I'm not sure if classes will provide any tangible benefit here. Also gulp is used for more fine-tuned control on dist file generation, and displaying stuff in the console after a build, like the package bundle size. I agree gulp is becoming an obsolete thing, but I don't think it needs to be removed just yet.