cli-custom-calendar
v0.3.9
Published
CLI tool to set up and manage a customizable calendar component. Supports both CSS Modules and Tailwind for styling, and automatically configures the project based on JavaScript or TypeScript environments. It also installs and sets up essential dependenci
Downloads
2,412
Maintainers
Readme
Demo
<Calendar size="SMALL_SIZE" />
<Calendar size="LARGE_SIZE" />
Description
This library is for next.js and react only.
- Customize the calendar component
- Data mapping support
- And more... do whatever you need
This CLI automatically copies the calendar component files from the GitHub repository and places them in your project.
CLI Calendar
Add the calendar component to your project.
Usage
create project
# next.js
npx create-next-app@latest
# React
npm create vite <project-name> --template react<ts,js>
#or npm i create-react-app...
install
npm install cli-custom-calendar
#or
pnpm add cli-custom-calendar
yarn add cli-custom-calendar
init
npx cli-calendar init
#or
yarn, pnpm add cli-calendar init
During initialization, you'll be prompted to: Choose your styling
- CSS Modules
- Tailwind CSS
// module.json
{
"name": "Calendar",
"version": "...",
"description": "A customizable calendar component using Day.js",
"packageManager": "pnpm", // your project manager
"isSrcDir": true, // path resolve
"type": "react", // react or next
"isRsc": false, // next.js pages or app
"isTsx": true, // typescript or javascript
"isUsingAppDir": false, // next.js & Dirpath
"styleType": "Tailwind",// style type
"pathResolve": "path" // template path
}
add
To add the calendar component, use the following CLI command:
npx cli-calendar add
#or
yarn, pnpm cli-calendar add
Removal Option
After installing the Calendar Component, you can uninstall my package and remove the module.json
file if you no longer need them.
npm uninstall cli-custom-calendar
#or
yarn, pnpm remove cli-custom-calendar
Dependencies
This project uses the following dependencies:
- Day.js for date manipulation
- clsx for conditional classNames
- class-variance-authority for utility class management
- Tailwind CSS (optional) or CSS Modules
info
//2024.09.19 ~ ing
@todo
mk demo
dev template
dev
note
If you encounter any issues or errors while using this package, please feel free to open an issue on the repository. https://github.com/lunaxislu/cli-calendar-lib/issues