Answer the question
In order to leave comments, you need to log in
How to deal with file order in grunt?
Hello. Started using grunt to build the project.
I use plugins like concat, uglify. But when js works, order is very important. And if you combine libraries in the wrong order, for example, so that jquery, boostrap go first, and only then your own scripts, you have to manually list the libraries. (And even if you manually specify the order, then uglify can change this very order during minification) Then the meaning of this whole automation is somehow lost. Maybe I'm doing something wrong. Or is it standard practice. Guru, please explain.
Answer the question
In order to leave comments, you need to log in
A good practice would be to separately connect libraries and main.js,
well, in the plan, you can write a task so that jquery.min.js is copied from bower_components/...
to dist/scripts/jquery.min.js
and all js from is src/scripts
merged and minified intodist/scripts/main.min.js
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question