代码规范 - noyobo/generator-xmc GitHub Wiki

JS规范

所有JS文件采用 commonJS 编写规范, 否则将无法正常打包! 请注意

比如:

var a = require('./mods/a');
var hello = require('./views/hello-render')

module.exports = function() {
    var html = hello({name:'noyobo'})
    alert(html)
    a.init();
    if ('@DEBUG@') {
      console.log('when @DEBUG@ show log');
    };
}