-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes #2. Parsing multiple expressions in binding style to inject _p…
…x2rem.
- Loading branch information
1 parent
527f753
commit d530396
Showing
14 changed files
with
517 additions
and
127 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,21 @@ | ||
const div = require('./div') | ||
const image = require('./image') | ||
const text = require('./text') | ||
const a = require('./a') | ||
const cell = require('./cell') | ||
|
||
const cmpMaps = { div, image, text, a, cell } | ||
|
||
module.exports = { | ||
div: require('./div').processDiv, | ||
figure: require('./image').processImage, | ||
p: require('./text').processText, | ||
a: require('./a').processA, | ||
section: require('./cell').processCell | ||
div: div.processDiv, | ||
figure: image.processImage, | ||
p: text.processText, | ||
a: a.processA, | ||
section: cell.processCell, | ||
// get ast compiler for binding styles. | ||
getCompiler: function (tag) { | ||
const cmp = cmpMaps[tag] | ||
const compile = cmp && cmp.compile | ||
return compile ? { compile } : undefined | ||
} | ||
} |
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
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
Oops, something went wrong.