Open skad0 opened 7 years ago
API:
/** * @param {BemCell[]} decl * @param {Object} opts * @param {String} opts.exportType - can be one of 'cjs', 'json5', 'json', 'es6' * @param {String} opts.format - v1, v2, enb * @returns {String} */
Description:
opts.format defines how to format normalized declaration:
opts.format
format
v1
v2
enb
opts.exportType defines how to wrap stringified declaration:
opts.exportType
cjs
json5
json
es6
export default
Returned string is representation of object with fields format and formatted decaration (name is defined by opts.format.
Usage:
Use at save with opts.exportType = 'cjs' by default.
save
opts.exportType = 'cjs'
no es6 right now
API:
Description:
opts.format
defines how toformat
normalized declaration:v1
- export formatted decl for v1 format with blocks fieldv2
- export formatted decl for v2 format with decl fieldenb
- export formatted decl for enb format with deps fieldopts.exportType
defines how to wrap stringified declaration:cjs
- in commonJS modulejson5
json
es6
-export default
(not right now)Returned string is representation of object with fields
format
and formatted decaration (name is defined byopts.format
.Usage:
Use at
save
withopts.exportType = 'cjs'
by default.