VSCodeMinify icon indicating copy to clipboard operation
VSCodeMinify copied to clipboard

Minify Directory Files Order

Open markpanado opened this issue 7 years ago • 5 comments

For example I have this directory with files:

/js/
/js/js1.js
/js/js2.js

Then I want to MInify Directory but I want to change the order to process js2.js first then js1.js. How would I do that?

markpanado avatar Apr 23 '17 19:04 markpanado

A temporary solution I have been using is to name them numerically 1_js2.js, 2_js1.js since it sorts alphabetically.

KyleDumas avatar May 08 '17 20:05 KyleDumas

@KyleDumas I see. I need to change my files names for a temporary fix. Thanks!

markpanado avatar May 09 '17 03:05 markpanado

Thanks for helping out @KyleDumas. @markpanado, can you explain to my why the processing order matters?

HookyQR avatar May 09 '17 03:05 HookyQR

@HookyQR I just want to make sure that a specific js files are loaded or prioritize first in the minified directory, regardless of file name format. Just to avoid unwanted behavior in my script?

markpanado avatar May 09 '17 03:05 markpanado

I'll also rename file but here's my use-case: I'm building a Chrome extension and I'd like to build a single utils.min.js from a directory like:

utils/
  config.js
  functions.js
  templates.js

But config.js relies on functions defined in functions.js and so the alphabetical order breaks this dependency

vict0rsch avatar Oct 13 '21 03:10 vict0rsch