I
I
Igor Makhov2020-06-28 13:14:26
Node.js
Igor Makhov, 2020-06-28 13:14:26

Am I using libraries correctly?

I decided to write a helloworld in React and it turned out that for this I would have to use the following libraries:

  • TypeScript - I'm used to writing in it
  • Express.js
  • Less/SCSS
  • Browserify to collect components and scripts into one file for the front
  • shell.js (possibly) - to copy static resources from src to dist
  • Gulp - to collect all of the above
  • Eslint - nowhere without it

I am confused by such a large number of libraries for such a small task, but I do not know how to reduce their number. I am especially confused by the size of the gulpfile that will have to be written in order to collect all this. Maybe I don't understand something?

PS I understand each of these libraries individually, but in general, as for me, they create some kind of monstrosity, despite the fact that the output will be a small page with a couple of buttons.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
F
FinGanapre, 2020-06-28
@FinGanapre

Using the framework always requires some preparation before launch, but the complexity of maintaining the project does not increase much later on.
Browserify, Gulp can easily replace webpack.
Express.js is for server side, do you write something in node.js and get hello world via api?
LESS/SCSS is your choice, it is not required for the task.
TypeScript - again, your choice.

M
McBernar, 2020-06-28
@McBernar

Well, you do not pull it to the front. Have you ever heard a mechanic complain about the abundance of tools and the spacious garage? Me not.
No one is forcing you to set everything up by hand. We took create-app and deployed the project.
And yes - you don't need express for statics.

A
Aetae, 2020-06-28
@Aetae

Normally, frameworks are always fat, these are not some miserable libraries for you.)
You just need to use ready-made presets for all occasions, either from the authors / community (creat react app?), or your own. Each time you write a config from scratch - of course you will go crazy.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question