# ODN Static Assets ## FOR NON-TORBIT CONTRIBUTORS Please add your files to the appropriate folder under: ``` markets/{your domain}/{feature} ``` for example: ``` markets/grocery.walmart.com/overrides markets/grocery.walmart.com/spa ``` Please attach your JIRA ticket to the PR so the reviewer has some context. Keep in mind that committing files to this static repo does not make them automatically available: ``` yourorigin.com/static.resource.html ``` You have to file a ticket with Torbit to implement a redirect for EACH resource. for example: ``` /blank.html >> /markets/www.walmart.com/blank.html /co/updating.html >> /markets/www.walmart.com/updating.html ``` ## BUNDLING We use `Node >= 12` and `webpack` to bundle and minify the static assets. Native Brotli support is bundled with Node as of v12. We utilize `compression-webpack-plugin` to pre-compress static assets to Brotli. ```bash npm run build ``` ## TEST ``` npm test ``` ## RELEASE Changes are released by fast forward merge from `master` to `prod`: ``` git fetch git checkout prod git pull -ff-only origin/master git push master ``` `git pull -ff-only origin/master` Will only merge the changes if merge can be resolved as a fast-forward. AKA the `prod` branch did not diverge from `master`. ## AUTO SYNC ##### master Branch (dev/QA only) As soon as something gets merged into the "master" branch, both dev and QA will have the files synced to them with the following intervals: - Dev: syncs every 5 minutes offset by 3 minutes (1:03, 1:08, 1:13, etc.) - QA: syncs every 5 minutes offset by 1 minute (1:01, 1:06, 1:11, etc.) ##### prod Branch (prod only) As soon as something gets merged into the "prod" branch, all prod nodes will have the files synced to them with the following intervals: - Prod: syncs every 15 minutes on the hour (1:00, 1:15, 1:30, etc.)