Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with merge options in templateEngine.templateOptions #56

Closed
pavelpower opened this issue May 30, 2016 · 1 comment
Closed

Error with merge options in templateEngine.templateOptions #56

pavelpower opened this issue May 30, 2016 · 1 comment

Comments

@pavelpower
Copy link

look on this line: https://github.com/enb/enb-bem-specs/blob/master/lib/node-configurator.js#L58

 // setup template engine
    var templateEngineOpts = _.assign({}, templateEngine.templateOptions, {
        target: '?.browser.template.js',
        filesTarget: '?.template.files'
    });

if i will include console for check options

 // setup template engine
    var templateEngineOpts = _.assign({}, templateEngine.templateOptions, {
        target: '?.browser.template.js',
        filesTarget: '?.template.files'
    });

    console.log('templateEngineOpts:', templateEngineOpts);
    console.log('templateEngine.templateOptions:', templateEngine.templateOptions);

and set options

specsBH.configure({
        langs: true,
        destPath: 'bh-set.specs',
        levels: ['blocks'],
        templateEngine: {
            templateTech: require('enb-bh/techs/bh-bundle'),
            templateOptions: {
                devMode: false,
                levelsTarget: '?.levels',
                filesTarget: '?.base.files',
                dirsTarget: '?.base.dirs',
                target: '?.bh.js'
            },
            htmlTech: require('enb-bh/techs/bemjson-to-html'),
            htmlTechOptionNames: {
                bemjsonFile: '?.bemjson.js',
                bhFile: '?.bh.js'
            }
        },
        sourceLevels: [
            { path: '../libs/bem-core/common.blocks', check: false },
            { path: '../libs/bem-pr/spec.blocks', check: false },
            { path: 'blocks', check: true }
        ]
    });

you will see this

templateEngineOpts: { devMode: false,
  levelsTarget: '?.levels',
  filesTarget: '?.template.files',
  dirsTarget: '?.base.dirs',
  target: '?.browser.template.js' }
templateEngine.templateOptions: { devMode: false,
  levelsTarget: '?.levels',
  filesTarget: '?.base.files',
  dirsTarget: '?.base.dirs',
  target: '?.bh.js' }

I not can build BH for only server.

@pavelpower
Copy link
Author

yep i used require('enb-bh/techs/bh-commonjs') not require('enb-bh/techs/bh-bundle')

pavelpower added a commit to IT-CTI/enb-bem-specs that referenced this issue May 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant