@crayon.js/literal
v3.3.3
Published
Terminal styling done light and fast.
Downloads
2
Maintainers
Readme
📚 About
Literal templates is an extension for Crayon that adds support for styling using ES6 Literal Templates.
⚙️ Usage
- On deno:
// Remember to replace "version" with semver version
import { crayon } from "https://deno.land/x/crayon@version/mod.ts";
import "https://deno.land/x/crayon@version/src/extensions/literal.ts";
console.log(
crayon`{red I'm red! {blue I'm blue!} {bgBlue.bold I'm kind of both! But also bold!}}`,
);
- On node:
import { crayon, prototype } from "crayon.js";
import { compileLiteral } from "@crayon.js/literal";
prototype.literal = compileLiteral;
console.log(
crayon`{red I'm red! {blue I'm blue!} {bgBlue.bold I'm kind of both! But also bold!}}`,
);
🤝 Contributing
Crayon is open for any contributions. If you feel like you can enhance this project - please open an issue and/or pull request. Code should be well document and easy to follow what's going on.
Since the start of development on Crayon 3.0 this project follows conventional commits spec. If your pull request's code could introduce understandability trouble, please add comments to it.
📝 Licensing
This project is available under MIT License conditions.