Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/agbortoko/php_vite_boilerplate
Boilerplate for implementing plain php projects with vite
https://github.com/agbortoko/php_vite_boilerplate
autoprefixer npm php postcss tailwindcss vanilla-php vite xampp
Last synced: 9 days ago
JSON representation
Boilerplate for implementing plain php projects with vite
- Host: GitHub
- URL: https://github.com/agbortoko/php_vite_boilerplate
- Owner: Agbortoko
- Created: 2024-08-21T14:35:24.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-08-21T15:19:45.000Z (3 months ago)
- Last Synced: 2024-10-12T00:21:54.148Z (about 1 month ago)
- Topics: autoprefixer, npm, php, postcss, tailwindcss, vanilla-php, vite, xampp
- Language: PHP
- Homepage:
- Size: 24.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Plain PHP and Vite Boilerplate
PHP/Vite Boilerplate for working with vite and plain php projects
Implement the following lines of code below after cloning this repository
npm install
composer installThe above will install the node packages and composer packages
## Working with Vite
Vite servers as a build tool in building and minifying your js and css code. To run the vite server in development mode
config/settings in app_mode development
$siteConfig = [
'app_mode' => "development",
'base_url' => "",
'base_path' => dirname(__DIR__, 1)
];When the your project in the development phase, run the following line of command in the terminal
npm run dev
When your project is in the production phase, run the following line of command in the terminal
npm run build
The above command builds and minifies your css and js code.
### Settings
Depending on the base url of your project your can modify the settings base_url string as shown below.
$siteConfig = [
'app_mode' => "development",
'base_url' => "http://localhost/rabbitmaid",
'base_path' => dirname(__DIR__, 1)
];