This is a fork of the require optimizer. Only the core features of the original optimizer will remain, everything else will be removed. The goal is to create a nodeJS package for finding the dependencies between AMD modules, putting them in order from the leaf modules to the root module, and turning anonymous modules into named modules.
This project will not concatenate the files (there are other projects for that) and it will not minify/uglify/compile the files (there are other projects for that). The original require optimizer also optimized CSS, this one will not do that, it will only optimize JavaScript AMD modules. The only thing it will do is rearrange the modules in a file and turn the anonymous modules into named modules. This step will probably require a sourcemap to be generated for each file, so that sourcemaps can be correctly generated by a minifier/concatenater.
This project will take a list of files as input, along with a config file, and return an ordered list of files as output. The output will be a larger set of files than the input, as it will contain the dependencies (and the dependencies of the dependencies, etc) of the input files.