About
cli-pages is used to easily create pages for your command line interfaces and apps in no time! It has all the features you possibly need!
Installation
npm install cli-pages
Example Usage
Creation
const { Book } = require("cli-pages");
let pages = new Book([
{
title: "Welcome to my app!",
content: "This app does a lot of stuff! It can help you build a rocket!",
footer: "Hope you enjoy!"
},
{
title: "This is Amazing!",
content: "epic!",
footer: "Hope you understood!"
},
{
title: "Thank you!",
content: "Thank you for using my app! I really appreciate it!",
footer: "<3"
}
]);
OR
let pages = new Book();
pages.addPage({
title: "Welcome to my app!",
content: "This app does a lot of stuff! It can help you build a rocket!",
footer: "Hope you enjoy!"
});
...
Displaying the pages in the terminal
const { Book } = require("cli-pages");
let pages = new Book([
{
title: "Welcome to my app!",
content: "This app does a lot of stuff! It can help you build a rocket!",
footer: "Hope you enjoy!"
},
{
title: "This is Amazing!",
content: "epic!",
footer: "Hope you understood!"
},
{
title: "Thank you!",
content: "Thank you for using my app! I really appreciate it!",
footer: "<3"
}
]);
pages.open();
setTimeout(function(){
pages.close();
}, 60000)
Examples on how to edit, remove pages, get number of pages, set custom configurations can be found here
🤝 Contribution
For contributing to this project, fork the repository here, make the changes and open a pull request! Pull requests will be reviewed before being merged.
🐛 Bugs
Found a bug? Having an issue with the package? Open a new issue here!