Commit graph

64 commits

Author SHA1 Message Date
Connor Hudson
df0db1b2c3 Update webpack config to load scratch-* dependencies 2018-06-19 11:24:22 -04:00
chrisgarrity
d1420862ea
Initial GUI embed (#1869)
- `/preview/editor` will load GUI with an empty project
- `/preview/:id/editor` will load GUI with a project from the projects server (not local data)
- passes intl object to GUI
- `/preview/:id` with show the project page with an embedded player
- `/preview/:id/fullscreen` will load the project page with the player in fullscreen mode.

* Note that we needed to Increase memory for the build to avoid running out of heap space, and build time increases by about 2 minutes
2018-05-02 15:27:49 -04:00
chrisgarrity
37437636ff FIx lint errors 2018-03-30 10:51:22 -04:00
Ray Schamp
d0e83afcb9 Allow building only a single view 2018-03-30 10:49:58 -04:00
Ray Schamp
aee9f0c608 Fix linting
Something is off with our indentation rules. Possibly a bug in the version of eslint we're using?
2018-03-19 11:58:03 -04:00
Andrew Sun͈̮
a66a0f02e5
lint? 2018-02-08 12:01:07 -05:00
Andrew Sun͈̮
f392678174 Don't run UglifyJS unless it's a production build 2018-02-08 11:08:15 -05:00
Ray Schamp
8f4bc64154
Merge pull request #1689 from as-com/eval-devtool
Don't use eval devtool in production
2018-02-08 10:19:27 -05:00
Ray Schamp
590f505a61 Revert "Merge pull request #1788 from LLK/revert-1775-hotfix/es6-upgrade"
This reverts commit 1b1b396e92, reversing
changes made to a144bab0e6.
2018-01-30 11:53:12 -05:00
Ray Schamp
46511e1253
Revert "[Develop] Upgrade to ES6" 2018-01-30 09:54:45 -05:00
Andrew Sun͈̮
afbc5acf42 Don't use eval devtool in production 2018-01-28 20:11:55 -05:00
Matthew Taylor
6d1f2fbccd initial es6 commit 2018-01-19 14:06:26 -05:00
Ray Schamp
84a37a671f Remove SmartyStreets API
We are so lax with this that it's not actually helping us, and we don't have a plan with them anymore.
2017-07-13 10:44:50 -04:00
LiFaytheGoblin
b4320b5807 Fixed prior mistake of changing regular expression in routes.json and edited webpack.config.js: I switched the order of the object with the title and require template-config.js. This will lead to the page titles to be set properly. 2017-06-19 10:22:55 +02:00
Ray Schamp
3efa1fd7c8 Merge pull request #911 from rschamp/feature/html-webpack-plugin
Use html-webpack-plugin for html rendering
2016-09-09 15:52:52 -04:00
Ray Schamp
fb3de8526a Don't try to output HTML for redirect routes 2016-09-09 09:34:36 -04:00
Ray Schamp
c274de7295 Make template variables a bit less verbose
Move the rest of the configuration into template-config.js.  This way the options are explicitly in the same namespace so we won't be surprised when we add a variable with the same name as an html-webpack-plugin option.

Rename template extension to ejs for syntax-coloring purposes.
2016-09-09 09:21:03 -04:00
Ray Schamp
3fbd9fab36 Use html-webpack-plugin for html rendering
This plugin will likely be updated when webpack is updated.
2016-09-08 09:59:37 -04:00
Matthew Taylor
b750ab8cf7 Add webkit prefixes for safari 8
`caniuse` updated their api recently, and it appears that support for safari 8 is no longer in the last 3 versions (and it appears that safari 8 is not listed as supported there in general). explicitly add the version back in to make sure the proper `-webkit` prefixes are included for that browser.
2016-08-30 11:12:11 -04:00
Ray Schamp
e3378d0f6a Merge pull request #662 from rschamp/feature/use-babel-develop
Use babel-loader for jsx transpilation
2016-07-18 13:07:23 -06:00
Ray Schamp
1db52c4e3b Use babel-loader for jsx transpilation
This is to remove the deprecation warning about React.__spread. It will give us other nice things too, though.
2016-07-03 15:57:13 -04:00
Technoboy10
42c000d14f orangify this 2016-06-30 18:06:17 -04:00
Ray Schamp
cfa85427b1 Add address validation 2016-06-14 17:29:30 -04:00
Ray Schamp
fe74208f32 Add international phone validation 2016-06-14 17:29:29 -04:00
Ray Schamp
aca5e206f7 Use eval for webpack devtool
The source-map devtool adds a lot of time to startup, and eval works just as well for debugging.
2016-06-02 15:27:32 -04:00
Ray Schamp
a0a30155af Hide components route in production 2016-05-24 17:15:03 -04:00
Ray Schamp
884e9ff4a7 Don't bundle polyfills
They are inherently global, so don't belong in the domain of webpack.
2016-05-17 21:02:36 -04:00
Ray Schamp
b65332c5d4 Set up Raven within init.js
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.
2016-05-17 21:02:35 -04:00
Ray Schamp
d1f9f8ee32 Mangling is the default
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. ¯\_(ツ)_/¯
2016-05-17 09:53:04 -04:00
Ray Schamp
8f2697b7f1 Move externals, polyfill and init to common chunk
This should allow us to define and update our dependencies more easily (via npm) as well as reducing the number of requests.

Additionally, when we add common packages this will avoid the issue after deploys where a user may get a cached HTML page, but new Javascript, leading to the dreaded blank page because the browser didn't download all dependencies.

Using mangle with UglifyJS also made the total file size for the common chunk bundle smaller than the current total for all of our external/polyfill scripts (1.18MB vs 1.55MB).
2016-05-16 12:59:58 -04:00
Ray Schamp
669a8c9ae3 Mark version with webpack 2016-04-28 15:40:50 -04:00
Matthew Taylor
38c4566e2b Split out name and view for routes
This will help for the conference urls, which will be sub-urls, all under `conference`
2016-04-21 16:16:59 -04:00
Ray Schamp
59227e3272 Merge branch 'add_redirects' of github.com:sclements/scratch-www into s3
# Conflicts:
#	.eslintrc
#	server/handler.js
2016-04-19 16:56:22 -04:00
Ray Schamp
43788eb7d8 Split server and routes/config
Turn HtmlGeneratorPlugin into a module
Turn server into dev-server and simplify it
2016-04-18 14:07:11 -04:00
Ray Schamp
3bdb95d40d Set up static view rendering 2016-04-14 16:22:13 -04:00
Ray Schamp
7aa05b1784 Upgrade css-loader and autoprefixer-loader
These depended on postcss < 5, which caused the errors like

Container#eachAtRule is deprecated. Use Container#walkAtRules instead.
Container#eachRule is deprecated. Use Container#walkRules instead.
Container#eachDecl is deprecated. Use Container#walkDecls instead.
Node#style() is deprecated. Use Node#raw()
Node#_value was deprecated. Use Node#raws.value
Container#remove is deprecated. Use Container#removeChild

The autoprefixer-loader package is deprecated now and recommends using postcss-loader + autoprefixer itself.
2016-04-13 15:21:25 -04:00
Shane M. Clements
32e2fb5516 Fixed another lint issue. 2016-04-09 11:07:21 -06:00
Shane M. Clements
a6be92448b Fixed linting errors and webpack config for redirect routes. 2016-04-09 10:39:55 -06:00
Ray Schamp
a5e336a175 Use redux for session handling 2016-03-18 11:51:22 -04:00
Matthew Taylor
98d0f0de6e Updates based on feedback
1. changes intl filenames to `[view].intl.js`
2. Move nav/footer rendering to `render.jsx`
3. Set locale cookie before submitting language change form

Thanks @thisandagain !
2016-01-14 08:32:43 -05:00
Matthew Taylor
ceec694b2a Revert "Migrate to using a loader method"
This reverts commit 214430b0c4.
2016-01-08 13:50:58 -05:00
Matthew Taylor
214430b0c4 Migrate to using a loader method
This moves all locale/translation building to a dependency, `scratch-www-intl-loader`, as well as tests associated with it. Also gets rid of the `make translations` step.
2016-01-07 17:01:57 -05:00
Matthew Taylor
448ca0b103 Remove main bundle
Render footer and nav on each view directly instead of globally in a separate bundle
2016-01-06 14:23:47 -05:00
Matthew Taylor
8ae98d703f Make localizations view-based
1. Load locale strings into `window._messages` in a separate file added to `template.html`, which contains view-specific and general strings
2. Update build-locales to compile separate files
2016-01-06 14:09:32 -05:00
Matthew Taylor
d9936af58f Remove Dedupe plugin from webpack
https://webpack.github.io/docs/list-of-plugins.html#dedupeplugin – it's still experimental. This allows `make watch` to update correctly.
2015-11-19 15:30:19 -05:00
Ray Schamp
c065df3faa Use webpack for static assets 2015-11-19 15:25:39 -05:00
Matthew Taylor
133e42de06 Update to beta 1
locales configuration not loaded automatically anymore, so we need to load react-intl with locales included into the browser ahead of time
2015-11-19 15:25:39 -05:00
Andrew Sliwinski
06de644ae6 Remove ./src/environment from Webpack config and bind environment to window. Resolves GH-199. 2015-11-03 10:49:32 -05:00
Matthew Taylor
a9d8119471 Allow loader to work with json correctly
It was trying to parse it as js before
2015-10-16 15:09:06 -04:00
Matthew Taylor
d0b22d0f97 Forgot to include these as part of init restructure 2015-10-16 11:02:41 -04:00