Answer the question
In order to leave comments, you need to log in
Are there Javascript preprocessors like Sass?
Good day to all!
I have been working with scss for some time, I find it very convenient to be able to create separate files for specific blocks, and then assemble the scss files into one css file.
In general, I get something like this structure:
styles / blocks / file.scss
styles / components / file.scss
styles / sassline / file.scss
main.css
, etc.
Actually, the question is: is there something similar for js so that you can make many separate js files and then collect them into one big file? it just becomes very inconvenient to end up looking for the desired function in a very long js file. Can someone advise how best to organize the structure of the js code on the project?
Answer the question
In order to leave comments, you need to log in
https://webpack.js.org - will change your understanding of file assembly in principle.
Just glue all files into one
https://www.npmjs.com/package/gulp-concat-js
Do the same structure as sass
Just like you collect scss files, you can also collect js :)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question