Rhino 1.9.0 Update On CRAN: New Formatting Tools And Cleaner {Bslib} Integration
Want to share your content on python-bloggers? click here.
![](https://i0.wp.com/wordpress.appsilon.com/wp-content/uploads/2024/07/668e9f1a800bf83c89694210_rhino1-p-800.png?resize=578%2C325&ssl=1)
We’re excited to announce the release of Rhino 1.9, bringing with it some powerful new features for developers. This update focuses on enhancing your coding experience with new formatting tools for JavaScript and Sass, as well as cleaner integration of {bslib} and custom Sass for ultimate flexibility when styling your application
Not sure what library is right for you between Rhino, Golem and Leprechaun? We did the comparison in this blog post.
New Formatting Tools
Rhino is committed to providing you with state-of-the-art tools for working with JavaScript and CSS, the backbone technologies of the web. Since its early versions, Rhino has offered linting tools powered by eslint and stylelint. The lint_js()
and lint_sass()
functions could also be used to format the code with the fix = TRUE flag.
The tooling landscape has shifted however, with linters now focusing primarily on detecting potentially problematic or buggy code. Formatting is now typically delegated to separate tools and prettier has emerged as the gold standard for this task.
Rhino 1.9 introduces a pair of new functions for formatting JavaScript and Sass powered by prettier:
rhino::format_js() rhino::format_sass()
You can now automatically format your code using state-of-the-art tools:
![](https://i0.wp.com/cdn.prod.website-files.com/654fd3ad88635290d9845b9e/668e9f55182a524afb22af4d_AD_4nXdHBQq4nQv2B69lqVxxokiojOi3uNGasT5VGxN9QTDKJa-6W4JSxwK8u3RzdxzMkV6asSl2QiBPtidf4MgreuGJN5-DGhXFpOnKHnHByCprKohK7HOblFCo6oJmf0vnGNHS7_3DJJJX6_fuXvwfypHU8-Yv.gif?w=578&ssl=1)
These functions ensure that your code is consistently formatted, making it easier to read and maintain.
Styling With {Bslib}
The {bslib} R package offers a UI toolkit based on Bootstrap. Shiny uses it under the hood for its default appearance, but it’s also possible to use {bslib} directly to access additional UI components, theming, and more.
Rhino comes with built-in support for writing custom Sass code giving you complete control over the appearance of your application. While you could use both {bslib} and custom Sass in Rhino before, it was somewhat cumbersome.
To make the integration cleaner, Rhino 1.9 introduces a new configuration option for Sass in the rhino.yml
file:
sass: custom
With some simple setup, you can elegantly combine {bslib} and custom Sass code to create unique and flexible styles for your projects.
![](https://i0.wp.com/cdn.prod.website-files.com/654fd3ad88635290d9845b9e/668e9f5598da85df70fa96e0_AD_4nXfiMqBR-ZZh1Mw-OWWZIaMn1lXgwDdQXFsoL7vRQlua1xeFhDwdF7-GY3rDleaiEKKoF-6sA3h0nWtfiKaPHgjCLM7WJRSIrjNrH8ss6mw5wZ0RclqjM6OpwE4O9w9-4lfXzx5HLL4FOQWjHannOc-E1FCs.gif?w=578&ssl=1)
For detailed instructions, refer to our guide on How-to: Use bslib with Rhino.
How To Install The Latest Version Of Rhino
Try out the new features today! You can grab the latest version from CRAN by running:
install.packages("rhino")
To migrate your existing Rhino project, check out the Rhino 1.9 Migration Guide.
Explore The Rhinoverse
![](https://i0.wp.com/cdn.prod.website-files.com/654fd3ad88635290d9845b9e/668e9f5507078ecacc1fbf98_AD_4nXeZ0_EgteettK_ntppti_jWwnbx2atQfUQbLcM20LxKpIs_uar4GcVxOhXCU2OMdL1_dnGqryxHhU4JhjZArt2ty8C_ZGoWcaQkOuF_66pU-8_CNwWn73xhD3ZZvl8maFLbPVs21xD5KaDP5yaURI4xjBI.jpeg?w=578&ssl=1)
Rhino can be a solid foundation for your Shiny application, but it doesn’t end there. Rhino is the centerpiece of a larger ecosystem – Rhinoverse, a family of open-source R packages created by Appsilon to address the needs of modern web development.
Make sure to check out the other members of the family on rhinoverse.dev!
Summing Up Rhino 1.9.0 Update
Rhino 1.9 represents our ongoing commitment to providing developers with powerful, flexible tools for creating exceptional Shiny applications. We’re eager to hear your feedback on these new features. Don’t hesitate to reach out with questions, suggestions, or to share your experiences with Rhino 1.9 in our Shiny community on Slack.
We share the latest updates on R/Shiny and data science in our newsletter. Sign up for our newsletter today.
The post appeared first on appsilon.com/blog/.
Want to share your content on python-bloggers? click here.