This news app is built on our interactive template. Check the readme for that template for more details about the structure and mechanics of the app, as well as how to start your own project.
To run this project you will need:
- Node installed (preferably with NVM or another version manager)
- The Grunt CLI (install globally with
npm i -g grunt-cli)
With those installed, you can then set the project up using your terminal:
- Pull the code -
git clone email@example.com:nprapps/wildfire-scroll
- Enter the project folder -
- Install dependencies from NPM -
- Grab the initial document data -
- Sync static assets -
- Start the server -
Like all interactive-template projects, this application uses the Grunt task runner to handle various build steps and deployment processes. To see all tasks available, run
grunt bundle less.
Common tasks that you may want to run include:
sheets- updates local data from Google Sheets
docs- updates local data from Google Docs
google-auth- authenticates your account against Google for private files
static- rebuilds files but doesn't start the dev server
cron- runs builds and deploys on a timer (see
publish- uploads files to the staging S3 bucket
publish:liveuploads to production
publish:simulateddoes a dry run of uploaded files and their compressed sizes
Fatal error: Port 35729 is already in use by another process.
The live reload port is shared between this and other applications. If you're running another interactive-template project or Dailygraphics Next, they may collide. If that's the case, use
--reload-port=XXXXX to set a different port for the live reload server. You can also specify a port for the webserver with
--port=XXXX, although the app will automatically find the first available port after 8000 for you.
- Install the following dependencies:
- ffmpeg: brew install ffmpeg (this can take a little while)
- imagemagick: brew install imagemagick
1. Inside your assets folder, create an originals folder. 1. Inside originals , create a videos folder and images folder. 1. Place assets into respective folders 1. In your assets folder, run the process_assets.sh file from the command line.
- Make sure originals/ is added to your .gitignore
- After pre-processing your images and videos, you will need to restart your server to incorporate them into your project. Control-C then grunt.