azproduction / lmd

LMD - JavaScript Module-Assembler for building better web applications :warning: Project is no longer supported :warning:
http://azproduction.ru/lmd/
MIT License
449 stars 27 forks source link

config.root and external lmd configs #186

Open azproduction opened 10 years ago

azproduction commented 10 years ago

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',
};
azproduction commented 10 years ago

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: '../../../../'
};