lmd icon indicating copy to clipboard operation
lmd copied to clipboard

config.root and external lmd configs

Open azproduction opened this issue 10 years ago • 1 comments

External lmd configs ignore config.root.

var config = {
    path: '../../../../',
    modules: {
        main: 'app/all7/catalog_view/main.js'
    },
    bundles: {
        searchFilter: '../../../../components/search_filter/.lmd/dev.lmd.js' // have to add ../../../../
    },
    main: 'main',
    output: 'build/build.js',
};
  • https://github.com/azproduction/lmd/blob/master/lib/lmd_common.js#L635
  • https://github.com/azproduction/lmd/blob/master/lib/lmd_common.js#L368
  • https://github.com/azproduction/lmd/blob/master/lib/lmd_common.js#L1235

azproduction avatar Apr 10 '14 07:04 azproduction

I assume "config_root": "../../../../" is a good solution for this issue. And as LMD interpolates configs we could keep config DRY:

var config = {
    root: '../../../../',
    config_root: '${root}'
};
// It interpolates to 
var config = {
    root: '../../../../',
    config_root: '../../../../'
};

azproduction avatar Apr 10 '14 07:04 azproduction