-
Notifications
You must be signed in to change notification settings - Fork 97
Working with static files (Beast Whoosh front end)
Ensure you have node.js and npm installed before proceeding.
Run:
npm install
on the root folder to automatically install all the remaining dependencies.
Run:
npm run styleguide
and open http://localhost:6060/ to see the style guide and further instructions about how to work with static files.
NOTE: the remaining contents of this wiki page are potentially outdated. We're still leaving them here until we get final instructions about how to work with static files.
Run:
npm run dev
to start the webpack-dev-server. This server (running at the port 8080)
serves the assets files while providing the hot reloading functionality
at the same time. Source files for static files are in freesound/static/src.
You can chose whether the Django template will load the static files from
the development server or from disc by setting the USE_JS_DEVELOPMENT_SERVER
parameter. By default, USE_JS_DEVELOPMENT_SERVER will be set to True
when running the Django application in DEBUG mode.
Run:
npm run deploy
This will generate the static files that will be used in production and
store them in the folder freesound/static. Generated distribution files
should not be added to the git repository. The deployment scripts take
care of generating the static files and copying them to the servers.