• Home
  • Why Erstwhile?
  • Getting Started
  • Learn Erstwhile
  • API Docs
  • Home
  • Why Erstwhile?
  • Getting Started
  • Learn Erstwhile
  • API Docs
  • Learning Erstwhile
  • File Structure
  • Compilation Process
  • Routing
  • Request Flow
  • Components and ErML
    • How Components are Compiled
    • Themes
    • Layouts
  • Scoped Variables
  • Modals
  • Models
    • Using an Erstwhile-aware Backend
    • Creating Your Own Description.json
    • Using Models from the Controller

Compilation Process

7 views 0

Written by mike
August 7, 2023

Erstwhile uses a compilation process to turn the application living in the /app directory into an actual functional website.

This compilation process starts when you run npm run start from your application root, and consists of several different directory watches recompiling things as you modify your application code:

  • watch:styles: This process watches your theme and /app/components directory for changes that could result in stylesheet updates.
  • watch:application: This process watches for changes within your theme and /app directory that could affect any other part of the application behavior.
  • webpack: As the other processes move files and compile into the /build directory, webpack will scoop up those newly updated files to create the javascript bundle for the application.

The end result of all of this is that your compiled application lives in /dist. Webpack also (conveniently) runs a web server at port 8080 so that you can see your application in the browser, and it will reload it after any changes. When it all looks good you can shut down the npm run start process and copy the /dist directory up to a web server to deploy.

Was this helpful?

Yes  No
Related Articles
  • Using Models from the Controller
  • Creating Your Own Description.json
  • Using an Erstwhile-aware Backend
  • Models
  • Modals
  • Scoped Variables

Didn't find your answer? Contact Us

Previously
File Structure
Up Next
Routing

loader

Join our Mailing List     

  • Privacy Policy
  • Terms of Use
  • © 2025 RestlessDev. Made in New Orleans.

Welcome to Erstwhile

Thank you for checking out Erstwhile. We’re just getting started, so if you’d like to keep up with our progress please register now and we’ll let you know when new releases come out.

loader

Email Address*

Name