Last active
July 19, 2017 08:12
-
-
Save Realetive/313d4e67e055aa230aeea06afd1bc452 to your computer and use it in GitHub Desktop.
bem-tools-create template for pobem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var EOL = require('os').EOL; | |
module.exports = function(entity) { | |
var elemPart = entity.elem ? ".elem(" + entity.elem + ")" : '', | |
modVal = entity.modVal || '', | |
modPart = entity.modName ? ".mod(" + entity.modName + " " + modVal + ")" : ''; | |
return [ | |
"block(" + entity.block + ")" + | |
(entity.modName && !entity.elem ? modPart : '') + | |
(entity.elem ? elemPart : '') + | |
(entity.elem && entity.modName ? modPart : ''), | |
" " | |
].join(EOL); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment