https://github.com/crayon-js/literal
📝 ES6 Literal templating support for crayon
https://github.com/crayon-js/literal
ansi crayon deno javascript js literal-template nodejs rgb styling template-literals terminal
Last synced: 3 months ago
JSON representation
📝 ES6 Literal templating support for crayon
- Host: GitHub
- URL: https://github.com/crayon-js/literal
- Owner: crayon-js
- License: mit
- Created: 2024-06-28T09:30:38.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-08-26T18:33:22.000Z (10 months ago)
- Last Synced: 2025-01-22T00:14:41.464Z (5 months ago)
- Topics: ansi, crayon, deno, javascript, js, literal-template, nodejs, rgb, styling, template-literals, terminal
- Language: TypeScript
- Homepage:
- Size: 17.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
README
# 📝 Crayon Literal Templates
## 📚 About
`@crayon/literal` is an extension for [Crayon](https://github.com/crayon-js/crayon) that adds
support for styling using ES6 Literal Templates.## ⚙️ Usage
```ts
// Remember to replace "version" with semver version
import crayon from "@crayon/crayon";
import "@crayon/literal";console.log(
crayon`{red I'm red! {blue I'm blue!} {bgBlue.bold I'm kind of both! But also bold!}}`,
);// Methods are also supported
console.log(
crayon`{rgb(0,255,0) Im green {bgHex(0xFF0000) and I have red background}}`,
);
```## 🤝 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.**Crayon 4.x** follows [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/).\
If your pull request's code could introduce understandability trouble, please add comments to it.## 📝 Licensing
This project is available under **MIT** License conditions.