PLATFORM
  • Tails

    Create websites with TailwindCSS

  • Wave

    Start building the next great SAAS

  • Pines

    Alpine & Tailwind UI Library

  • Auth

    Plug'n Play Authentication for Laravel

  • Designer comingsoon

    Create website designs with AI

  • DevBlog comingsoon

    Blog platform for developers

  • Static

    Build a simple static website

  • SaaS Adventure

    21-day program to build a SAAS

Written By
Views

Easily compile Wave assets scripts

Easily compile Wave assets scripts

Hello, Marc here!

I'm going to expose two scripts that helps me a lot to compile Wave and other assets for dev and production environments.

In a Wave project, you need to compile theme assets individually from project assets (Like Vue.js components, Sass...)

This scripts will compile for you all your project and theme assets.

So, when I'm working at my local environment I just need to run this script to compile dev files. (This also gives me the full code for tailwind classes)

buildAssetsDev.sh

#!/bin/bash
echo "\033[1;32mBuilding main assets"
npm run dev

echo "\033[1;32mBuilding tailwind theme assets"
cd resources/views/themes/tailwind/
npm run dev

Then, when I'm ready to push all my changes to my servers in production environments, I've just have to run the production script:

buildAssetsProd.sh

#!/bin/bash
echo "\033[1;32mBuilding main assets"
npm run production

echo "\033[1;32mBuilding tailwind theme assets"
cd resources/views/themes/tailwind/
npm run production

You can add more assets to compile, those are for the main laravel project and tailwind theme.

Those are very simple scripts, but it helps me a lot when I have to push changes to production, and then return to my local environment and using dev assets.

Hope that you understand my awesome english, and wish those scripts can help you!

Thank you

Comments (0)

loading comments