Unfortunately there's no way to map extensions to MIME type. The s3cmd tool guesses wrong and uploads svgs with text/html. Upload everything but svgs first, then upload only svgs using the correct MIME type.
1. split `auth.js` up so it's 1 reducer per file
2. consolidate the conference schedule reducers
3. make conference reducer names more descriptive
4. add error handling for `body === 'undefined'`
Thanks @rschamp for all the help!
* 'develop' of https://github.com/LLK/scratch-www: (32 commits)
Lint
Bundle all locale data
Don't bundle polyfills
Set up Raven within init.js
Prefix privacyPolicy message string
Exclude minified javascript from linting
One space more
Changes "interfacesto" to "interfaces to"
Remove tag target
Filter before mapping to avoid returning undefined
Fix Pass condition for "static" routes
Spacing2
Mangling is the default
Spacing
Update for typography fixes
Cherry pick PR #476 into master
Add invisible spacer to anchored sections
For Developers
Lint JSON, expand and simplify lint step
Fix banned user redirect
...
# Conflicts:
# src/redux/actions.js
# src/redux/reducer.js
convert path variables in express (i.e. dev-server) into rules that work for fastly (i.e. `.+?`). I tried to make it `\w+?`, but javascript seemed to either want no `\`'s or two `\`'s
Use a model of reducer/action files for each component that has them, and make `reducer.js` be the one that imports and configures all of them. This modeling is based on a few examples I've seen which seemed to work for our current case, but I'm totally fine with splitting actions and reducers into separate directories if we'd like too.
Since it's using `require` to get the localisation strings, check if the error is `MODULE_NOT_FOUND` before moving on – because if it isn't, then there is an unknown error that should be thrown. Thanks @rschamp for the suggestion!
Before we were using glob, which was about to start failing on subdirectories in views (which we started using in `conference`). Instead of searching for `l10n.json`, it seemed more appropriate to instead look for localization by using the configured pages that need to be localized.
Now that Raven is bundled with webpack, it's not available in the global context, so require it and configure it within the init module.
I struggled to figure out how to expose the raven-js module as a global, as all the combinations of `externals` and `ProvidePlugin` only applied to webpacked modules, not the global window. The correct way to do it seems to be exports-loader but that looked rather hacky and hard to understand.
Grid component now no longer uses row concept, and changed tabs in the
Explore page to projects/studios, with categories in a new picker above
the tabs. Also compressed svg files.
Previously we relied on the static directory to construct the pass condition, but this doesn't include many things added to the build other than static files. So instead of adding these explicitly through `extraAppRoutes`, base the Pass condition on the final build, but exclude the view .html files. This way the version.txt, routes.json, and all directories added by webpack will be resolved to S3 rather than scratchr2.
Thanks @mewtaylor. Not sure what changed. When I double checked this, the common bundle was the same size with or without the option. Weirdly it also mysteriously changed its size from the last time I checked to 1.23MB. ¯\_(ツ)_/¯