Skip to content

Latest commit

 

History

History
48 lines (42 loc) · 1.03 KB

README.md

File metadata and controls

48 lines (42 loc) · 1.03 KB

Frontend Starter

Basic starter for frontend throw-away experiments and design explorations. You probably don't like it or need it. Also, please DO NOT USE IN PRODUCTION.


Out of the box

  • Twig Templates
  • Tailwind CSS
  • IBM Plex font (sans, serif, mono and all variants)
  • Laravel Mix for asset compilation
  • Purge CSS Optimizer
  • .env file support
  • primitive router (switch/case)

Installation

composer install && npm install

Local Webserver

php -S localhost:8000 -t web/

Compiling Assets

  • Development - does not minify and purge the css
npm run dev
  • Watch changes - recompile if a file changes, does not minify and purge the css
npm run watch
  • Production - compiles assets the most optimal way
npm run prod

Defining Routes

You can define routes in the src/index.php file.

case '/' :
    echo $twig->render('pages/index.twig', ['title' => "Hello World!"]);
    break;
default:
    echo $twig->render('pages/404.twig', []);
    break;