# Develop & Build
Make sure that Docker is installed and configured and NodeJS and NPM are installed. The host will list the HTML files, Webpack makes sure that changes you make in develop are updated to the output files.
To start the host, run in the terminal:
docker-compose up
This will install optional server dependencies (this may take a while) and fire up the server. You can now access the prototype via your-project-folder-name.host/proto.php
.
To stop the host:
ctrl/cmd + c
docker-compose down
# Develop
When developing, run in the terminal:
npm start
from the folder where the package.json
and webpack.config.js
are located. The default is /www/
.
This command will:
- Run a script to generate a Sprite Map of SVG Symbols (when you add a new svg symbol, stop and restart the process)
- Tell Webpack to start the devServer and compile all assets
- Fire up your browser and open the
_proto
directory to list all the available templates in the prototype
We use the built in WebpackDevServer
to automatically refresh the assets on change. Go to localhost:3000
or your-project-name.host:3000
for a live reloading server.
Stopping the process
Run: [ctrl / cmd] + c
in the terminal.
# Production mode
When you want to create a production build from all the source files, run in the terminal:
npm run production
from the folder where the package.json
and webpack.config.js
are located. The default is /www/
.