Reorganize core exports#1262
Conversation
ang-zeyu
left a comment
There was a problem hiding this comment.
The entry point and object export standardising (is there an eslint rule for this?) looks good, just some comments:
| const Parser = require('markbind/src/parser'); | ||
| const VariablePreprocessor = require('markbind/src/preprocessors/variablePreprocessor'); | ||
| const Parser = require('markbind/src/Parser'); | ||
| const VariablePreprocessor = require('markbind/src/preprocessors/VariablePreprocessor'); |
There was a problem hiding this comment.
I'll be touching on variablePreprocessor shortly, don't mind if you want to include it here though
There was a problem hiding this comment.
#1263, a bugfix + small directory reorganization for variable processing files. Plan to resume work on it after moving packages/markbind to minimise conflict resolution though
| markdownItEscapeSpecialTags.injectTags(tagsToIgnore); | ||
| } | ||
|
|
||
| module.exports = { |
There was a problem hiding this comment.
Is there a rationale for only exporting the following? (and not other things like errors)
*I'm fine with the cleanup as it is though, since we're going to move all the other things inside core and change the import / paths again
There was a problem hiding this comment.
Abstraction, since the caller (CLI) shouldn't need to know how ignoring is done nor access those modules directly.
| const markdownItEscapeSpecialTags = require('./src/lib/markdown-it/markdown-it-escape-special-tags'); | ||
| const Parser = require('./src/Parser'); | ||
|
|
||
| function ignoreTags(tagsToIgnore) { |
ang-zeyu
left a comment
There was a problem hiding this comment.
Lgtm 👍, needs a commit message though, think we could use a merge commit here since it's all rather related.
cee75f9 to
2eb6dda
Compare
|
Force-pushed the fixup. Can you help with the merge commit? |
yup sure, thanks for cleaning this up! |
What is the purpose of this pull request? (put "X" next to an item, remove the rest)
• [x] Other, please explain: Module structure consistency and extensibility
What is the rationale for this request?
Have consistent module structure and file naming convention.
What changes did you make? (Give an overview)
newed.CyclicReferenceErroris not ahandler; error.js similar to constants.js.ignoreTagsand provide an entry point.