Easy Components is a project designed to boost productivity by providing reusable components commonly used in company projects. It allows you to quickly set up elements like a header with a logo and menu, which transforms into a hamburger menu on mobile, among other components.
easy-components
├── README.md
├── node_modules
├── package.json
├── pnpm-lock.yaml
├── scripts
│ └── build.sh
├── src
│ ├── components
│ │ ├── header
│ │ │ ├── header.css
│ │ │ ├── header.html
│ │ │ ├── header.js
│ │ └── ...
│ ├── index.html
│ └── input.css
└── tailwind.config.js
- Clone the repository:
git clone [email protected]:V1ctorW1ll1an/easy-components.git
- Install dependencies:
npm install -g pnpm
cd easy-components
pnpm install
To start a development server and view the components, run:
pnpm run dev
This project uses Tailwind CSS for styling the components. The build.sh script helps automate the process of compiling styles. Before running it, you need to grant execution permission to the file:
chmod +x ./scripts/build.sh
- Generate Minified CSS for a Specific Component:
pnpm run tailwind:minify [component]
Example:
pnpm run tailwind:minify header
- Watch for Changes and Automatically Recompile CSS:
pnpm run tailwind:watch [component]
Example:
pnpm run tailwind:watch header
- Generate Minified CSS for All Components:
pnpm run tailwind:minify:all
The build.sh script supports the following file extensions: html, js. It will look for files with these extensions in each component directory to generate the CSS.
- Header: A header with a logo and menu, transforming into a hamburger menu on mobile.
Each component has its own style files (.css), HTML structure (.html), and JavaScript scripts (.js).
Feel free to contribute new components or improvements to existing ones. To do so, follow the standard contribution steps:
- Fork the project.
- Create a branch for your feature (git checkout -b feature/feature-name).
- Commit your changes (git commit -m 'type: :icon: ').
- Push to the branch (git push origin feature/feature-name).
- Open a Pull Request.
This project is licensed under the MIT License. See the LICENSE file for more details.