Code for the Scratch Jr Website
  • JavaScript 65.7%
  • HTML 21%
  • SCSS 9%
  • CSS 3.3%
  • EJS 1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Christopher Willis-Ford 18700d3a56
Some checks failed
Build and Deploy ScratchJr Website / setup (push) Has been cancelled
Build and Deploy ScratchJr Website / lint (push) Has been cancelled
Build and Deploy ScratchJr Website / build (push) Has been cancelled
Build and Deploy ScratchJr Website / deploy (push) Has been cancelled
Build and Deploy ScratchJr Website / configure-fastly (push) Has been cancelled
Merge pull request #376 from scratchfoundation/master
Merge master to develop
2026-08-20 08:47:03 -07:00
.github ci: order Fastly config after upload; require "true" to activate 2026-07-16 15:23:01 -07:00
.vscode Fix spacing in two spots on info.jsx 2022-03-31 10:31:04 -04:00
bin refactor: annotate generated snippets and use default priority 2026-07-30 13:40:42 -07:00
dev-server build: select webpack mode via NODE_ENV so staging can ship a dev build 2026-07-14 11:00:56 -07:00
src Merge branch 'jessblake-west/devtechupdates' of https://github.com/scratchfoundation/scratchjr-website into jessblake-west/devtechupdates 2026-08-18 08:01:00 -04:00
static A few more content edits 2026-06-24 16:38:07 -04:00
templates feat: add enviroment conditions 2023-05-24 09:43:04 -04:00
test refactor: annotate generated snippets and use default priority 2026-07-30 13:40:42 -07:00
.browserslistrc build: upgrade to webpack 5 and Babel 7 2026-07-14 10:38:33 -07:00
.eslintignore Sync master content (#44) 2017-04-21 08:31:38 -04:00
.eslintrc.js Sync master content (#44) 2017-04-21 08:31:38 -04:00
.gitignore DevTech updates 2026-06-23 15:13:49 -04:00
.nvmrc ci: move the build off end-of-life Node 17 2026-07-14 09:57:59 -07:00
.sass-lint.yml Fixing Linter errors and styles 2016-09-06 10:17:25 -04:00
LICENSE Update license and trademark files 2017-08-16 16:50:48 -04:00
package-lock.json chore: revert package-lock.json to match develop 2026-08-13 06:46:44 -07:00
package.json refactor: build route VCL as snippets, not per-route Fastly objects 2026-07-16 12:30:00 -07:00
README.md ci: order Fastly config after upload; require "true" to activate 2026-07-16 15:23:01 -07:00
TRADEMARK Update TRADEMARK 2018-06-18 13:16:00 -04:00
webpack.config.js build: select webpack mode via NODE_ENV so staging can ship a dev build 2026-07-14 11:00:56 -07:00

scratchjr-website

Code for the ScratchJr website

Build Status Greenkeeper badge

Before Getting Started

  • Make sure you have node (v4.2 or higher) and npm installed

To Build

npm install
npm run build

Note: There will be a warning about a peer dependency on jquery. You can ignore it because slick-carousel is only used for stylesheets.

To Run

npm start

During development, npm start watches any update you make to files in either ./static or ./src and triggers a rebuild of the project. In development the build is stored in memory, and not served from the ./build directory.

When running npm start, here are some important log messages to keep an eye out for:

  • webpack: bundle is now VALID. the bundle has been loaded into memory and is now viewable in the browser. This will show up both once npm start has completed its setup, and also once updates you make to files have been re-compiled for viewing in the browser.
  • webpack: bundle is now INVALID. if you see this, then it means you have made updates to files that are still being compiled for browser viewing. Pages will still be viewable, but they will not see any updates you made yet.

Once running, open http://localhost:8333 in your browser. If you wish to have the server reload automatically, you can install either nodemon or forever.

To stop

Use ^C to stop the node process npm start starts.

Configuration

npm start can be configured with the following environment variables

Variable Default Description
NODE_ENV null If not production, app acts like development
PORT 8333 Port for devserver (http://localhost:XXXX)

Deploy Environment Variables

Variable Default Description
FASTLY_SERVICE_ID '' Fastly service ID for bin/configure-fastly.js
FASTLY_API_KEY '' Fastly API key for bin/configure-fastly.js
FASTLY_ACTIVATE_CHANGES false Set to true to activate changes and purge all after configuring
AWS_ACCESS_KEY_ID '' AWS access key id for S3
AWS_SECRET_ACCESS_KEY '' AWS secret access key for S3