Skip to content

Instantly share code, notes, and snippets.

@abrjagad
Created April 22, 2016 09:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abrjagad/3359c602c5d3045059165f5055dcf33c to your computer and use it in GitHub Desktop.
Save abrjagad/3359c602c5d3045059165f5055dcf33c to your computer and use it in GitHub Desktop.
var f = ['women','men'];
var context = require.context('./', true, /.scss$/);
var module = context.keys();
module.sort(function(a,b){
return (f.indexOf(a.split('/')[1])>f.indexOf(b.split('/')[1]))
});
console.log(module);
//module.forEach(context)
//// execute them
module.forEach(function(key) {
context(key);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment