0.1.0 • Published 5 years ago
remacro-core v0.1.0
remacro
Usage
With this tool it's possible to generate a superset of markdown, so that you don't want to repeat yourself.
It also works for any plain-text content, so it's able to expand source code as well.
Examples:
# Hello World
Lorem ipsum
<LoveBox>This is a custom widget</LoveBox>const Box = ({ icon, children }) => "> :" + icon + ": " + children
const LoveBox = ({ children }) => <Box icon="heart">{children}</Box># Hello World
Lorem ipsum
> :heart: This is a custom widgetfoo, err := bar()
<Err v=foo />const Err = ({ v }) => `if err != nil {
return nil, err;
}
return ` + v + ", nil"foo, err := bar()
if err != nil {
return nil, err;
}
return foo, nilThe syntax for writing macros is the same for writing components in React.
Live editor
Click here for a web-based editor with live preview.
CLI
Installation
npm install -g remacroCall
remacro --input "$(cat file1.md)" --macros "$(cat file2.js)"Integration with VSCode
TODO
0.1.0
5 years ago