I work a lot on Laravel projects. As a front-end developer, I always have to deal with the front-end stack installation and codestyle/code quality stuff.
I'm tired of doing the same things over and over again. Grab my ESLint config files, copy them to my new project. Grab all PHP Codestyle stuff, copy everything to my new project. Install all the dependencies, and so on.
I could have used a Laravel starter project but I just love to start from scratch with a fresh Laravel installation using the Laravel installer commands.
This is why I created Venus.
Venus - the Roman goddess of love, beauty, fertility, prosperity, and desire - is a very opinionated Laravel package designed to streamline the integration of essential code style tools, such as ESLint, Duster, and Prettier, into new Laravel projects. With the help of artisan commands, Venus simplifies the installation process, promoting cleaner and more consistent code across all of my projects.
This package contains the following tools:
- ESLint: a tool for identifying and reporting on patterns found in ECMAScript/JavaScript code, with the goal of making code more consistent and avoiding bugs.
- Duster: a tool for identifying and reporting on patterns found in PHP code, with the goal of making code more consistent and avoiding bugs.
- Prettier: an opinionated code formatter. It enforces a consistent style by parsing your code and re-printing it with its own rules.
- Complete front-end stack installation with PostCSS, Tailwind CSS and Alpine.js.
You can install the package via composer:
composer require manoz/venus --dev
Once the package is installed, you can run the following artisan commands to install the tools:
Install everything:
php artisan venus:install --all
npm install
Install only ESLint:
php artisan venus:install --eslint
npm install
Install only Duster:
php artisan venus:install --duster
Install only Prettier:
php artisan venus:install --prettier
npm install
Install only the Front-end stack:
php artisan venus:install --frontend
npm install
Don't forget to import Tailwind CSS in your resources/css/app.css
file:
@import "./tailwind.css";
Each tool will have its own configuration file and dependencies. Everything will be installed for you and config files will be copied to your project.
Be careful: this package will overwrite your existing ESLint, Duster and Prettier config files.
It will also add npm scripts and package to your package.json
file.
It will also add composer scripts to your composer.json
file.
You can configure ESLint by editing the .eslintrc.js
file in the root of your project. More informations can be found on the ESLint website.
There's a lot of stuff happening behind the scenes with Duster.
You should check usage and options on the Duster website.
You can configure Prettier by editing the .prettierrc.json
file in the root of your project. More informations can be found on the Prettier website.
Tailwind CSS and Alpine.js are already configured. You can extend Tailwind's configuration by editing the tailwind.config.js
file in the root of your project. More informations can be found on the Tailwind CSS website.
Thank you for considering contributing to Venus! The contribution guide can be found here.
If you discover any security-related issues, please review the security policy instead of using the issue tracker.
Licensed under the MIT License, Copyright © Manoz.
See LICENSE for more information.