Files are stored within the
Files are processed with a Gulpfile into the
Files are collected into the
Note that files under the
static/ folder are editable and the files under the
staticfiles/ folder are generated and should not be edited.
Every interactive has a generated thumbnail stored in
These can be created with
You will need to run the
./dev collect_static command after for them to appear in the
Any modules used must be listed with a
package.json file within the directory, with the
package.json file listed in the
csfieldguide/package.json file (see examples already within this file).
If you wish to not apply optimisation steps (Browserify, minification, etc), then list the files within the
js_files_skip_optimisation constant within
Any files within the
csfieldguide/static/js/modules/ directory are skipped by the Gulpfile and not processed by themselves.
If NPM modules are added, modified, or deleted, the Docker images will need to be rebuilt using
./dev build node.
Multiple sets of Node dependencies are installed throughout the project using
This includes a high level
package.json file for website dependencies at
csfieldguide/, and then more
package.json files within the
We have chosen to install Node dependencies within the Docker container, however we have the installed dependencies excluded from the Docker Compose volume that maps the developer’s local directory within the container.
node_modules is specified individually (within
infrastructure/local/django/Dockerfile), as the Docker volume of the website dependencies (would be
csfieldguide/node_modules) would hide the
node_modules directory for each interactive’s dependencies, therefore resulting in interactives looking at the top level
node_modules directory for dependencies.`
This meant that some interactives were using versions on dependencies that they were not intended for.