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/componentsdirectory for changes that could result in stylesheet updates. - watch:application: This process watches for changes within your theme and
/appdirectory that could affect any other part of the application behavior. - webpack: As the other processes move files and compile into the
/builddirectory, 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.