FreedomSponsors development environment uses grunt to generate a single .js file by concatenating other files.
Basically it will read some files from djangoproject/statfiles/static/js/**
and write to djangoproject/statfiles/static/js-generated/fs.js
.
So anytime you change any javascript, you need to rebuild fs.js
sudo apt-get install nodejs npm
sudo npm install grunt-cli -g
You do this once in a lifetime.
sudo ln -s /usr/bin/nodejs /usr/bin/node
Make 'node' command available as soft link to 'nodejs' command, otherwise 'npm install' below might run into errors.
cd djangoproject
npm install
This will create a node_modules
folder.
You only need to run npm install
again if there's any change to the package.json
file
cd djangoproject
grunt build
You need to run grunt build
whenever you change anything in the javascript code