scalableminds / amd-optimize

An AMD (RequireJS) optimizer that's stream-friendly. Made for gulp.
MIT License
162 stars 29 forks source link

Use configFile.deps instead of moduleName #43

Open tamtakoe opened 9 years ago

tamtakoe commented 9 years ago

I find it too verbose if there is deps: ["index"] in configFile.

amdOptimize.src("index", {
  configFile : "src/scripts/require_config.js"
});

Better

amdOptimize.src({
  configFile : "src/scripts/require_config.js"
});

I also do not understand why do set files in gulp.src. In the gulp.src must specify only config file.

Much better

gulp.src("src/scripts/require_config.js")
    .pipe(amdOptimize())