Paginate is a JavaScript library for paginating text using HTML canvas. It allows users to change the font, font size, line height, and more.
To run PaginatorJS locally, you'll need to install TypeScript and a global HTTP server. Follow these steps:
Before you get started, make sure you have Node.js and npm (Node Package Manager) installed on your system. You can download and install them from Node.js website.
-
Clone the repository to your local machine:
git clone https://github.com/Cedar-81/paginate.git
-
Navigate to the project directory:
cd Paginator
-
Install the required development dependencies:
pnpm install
-
To run on dev server:
pnpm run dev
This will generate mjs, js nd d.ts files in the
dist
directory from src/paginate.ts. -
IMPORTANT: Do well to import all exported functions in the src/index.ts files so that it is compiled to mjs file on build
-
Open your web browser and access your PaginatorJS page at
http://localhost:8080
or a different URL provided by your HTTP server.
To use PaginatorJS in your own HTML project, include the generated JavaScript file in your HTML, and follow the usage instructions mentioned in the previous README example.
font
: The font to use.fontSize
: The font size.fontColor
: The font color.lineHeight
: The line height.- Add more options and their descriptions here.
If you would like to contribute to PaginatorJS, please follow our contributing guidelines.
This project is licensed under the MIT License. See the LICENSE file for details.