KA-Huis / space-management-frontends

Frontend files for the space management application
0 stars 1 forks source link

Setup asset compilation (Laravel Mix) #4

Closed cyrildewit closed 2 years ago

cyrildewit commented 2 years ago

See #3

cyrildewit commented 2 years ago

@joeyvonck I'm using docker to setup an environment with Node.js, but you can install Node.js locally from https://nodejs.org/en/download/. LTS or Current stable version are both fin. The latter one is of course more up to date.

After installing Node.js, you could install Yarn. It's faster than NPM.

Run corepack enable if that's not working run npm i -g corepack

If you've installed Yarn:

  1. Cd into your space-management-frontends repository.
  2. Run yarn to install the required dependencies
  3. Then:
    • Run yarn dev to build only one time for DEVELOPMENT
    • Run yarn watch to build every time a file changes for DEVELOPMENT
    • Run yarn production to build for production (this is not necessary for local development)

If you've not installed Yarn you can use NPM:

  1. Cd into your space-management-frontends repository.
  2. Run npm il to install the required dependencies
  3. Then:
    • Run npm run dev to build only one time for DEVELOPMENT
    • Run npm run watch to build every time a file changes for DEVELOPMENT
    • Run npm production to build for production (this is not necessary for local development)