Commit graph

68 commits

Author SHA1 Message Date
Colby Gutierrez-Kraybill
4749bd1bbd Add docker-up and docker-down rules to Makefile. Now depends on a npm module 'scratch-docker' which brings a network configuration script that handles creating a named docker network that all other scratch repos that have docker configurations depend on 2018-08-21 13:09:38 -04:00
Ben Wheeler
097fb66955 currentStudioIds now an array; reverted a few changes 2018-07-31 15:00:56 -04:00
Ben Wheeler
8eec0d3a87 corrected parentheses for lint error 2018-07-27 10:49:42 -04:00
Bryce Taylor
fe1ef5a750
Merge pull request #1879 from BryceLTaylor/Verbose-Testing
Verbose testing
2018-05-14 11:31:39 -04:00
BryceLTaylor
e88d5f8745 Add verbose method of running integration tests to output results of each test. 2018-05-08 16:43:41 -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
Ray Schamp
46511e1253
Revert "[Develop] Upgrade to ES6" 2018-01-30 09:54:45 -05:00
Matthew Taylor
6d1f2fbccd initial es6 commit 2018-01-19 14:06:26 -05:00
chrisgarrity
74e315dc71 Add new Tips page (#1357)
New of tips page, uses cards from new resources server (s3)

* added get-localized-urls script to get the generated json from the s3 bucket
* added /tips route
* correct localized-urls for other pages
* remove thingstotry
* redirect /go
* fix up /info/cards view to use resources (s3).
* redirect /go to /tips
* change /hoc redirect from /go to /tips
* Add full set of cards pdf download to tips localization
* removed cards and guides from static PDFs, they are all coming from resources.scratch.mit.edu now.
* removed things to try view

Corrections for reviews:
* decided to pretty print the localized URLs
* replaced console.errors with process.stdout and fail with exit(1)
* formatted localized-urls to make it easier to read
* moved link outside  `<Button…` makes whole button clickable instead of just text
* fixed up css styles, removed unnecessary classes
* corrected “unused” resource links
2017-06-21 16:20:18 -04:00
jwzimmer
de78abbea2 Issue/gh 1167 test splash page (#1185)
* automated tests for footer links

* renamed navbar test file and removed footer links to separate file

* run with make smoke

* added tests for join scratch and sign in in navbar

* fix linter errors & update www links

* addressed some of ray's comments

* fix failing test - projects row link

* maybe fix error?

* continue switching to click, convert so it runs with disabled selenium promise manager, and refactor to be less location dependent

* finish switching off of implicit reliance on selenium promise manager
2017-04-19 17:14:02 -04:00
Matthew Taylor
0912fca5f2 Use scratchr2_translations for language files
Adjusts the translation system to go back to using a github repo to store snapshots of transltions, but continues to use new `.json` formatted files
2017-02-24 07:58:50 -05:00
chrisgarrity
82785435bf New scripts to generate translations from Transifex
Added tx-import, expects TX_TOKEN environment variable to be set to an API token for Transifex. If no API token exists it’ll just use the default English strings for everything.

Removed the localization spot checks because they were checking tha json got built from po files. With Tx-import the files are already json, and may possibly be missing.
2017-02-15 22:51:15 -05:00
Jesse Zoldak
838925cca0 Output coverage data only when make coverage is executed 2016-10-28 17:56:41 -04:00
Jesse Zoldak
8260e40385 Measure test coverage 2016-10-24 20:47:38 -04:00
Ray Schamp
1fea24fd5c Use no-cache so ETags are used
From https://developers.google.com/web/fundamentals/performance/optimizing-content-efficiency/http-caching

> "no-cache" indicates that the returned response can't be used to satisfy a subsequent request to the same URL without first checking with the server if the response has changed. As a result, if a proper validation token (ETag) is present, no-cache incurs a roundtrip to validate the cached response, but can eliminate the download if the resource has not changed.

This is what we want to happen.
2016-10-14 15:08:34 -04:00
Ray Schamp
1e7bd97987 Merge pull request #910 from rschamp/bugfix/787
Add Cache-Control header to all S3 uploads
2016-09-21 16:51:38 -04:00
Matthew Taylor
dc209f466a Fall back to doing it the svg way 2016-08-04 08:35:30 -04:00
Matthew Taylor
3a6ed90e72 Don’t use mime magic to guess
hopefully just using file extensions works
2016-08-04 08:24:02 -04:00
Matthew Taylor
538aed21eb remove extra space 2016-08-04 08:04:45 -04:00
Matthew Taylor
1013f260b9 Use guess-mime-type to get the right file type
should help with some header issues we’re seeing. Also remove `x-frame-options` meta tag, since it’s not acknolwedged by some browsers (like Chrome).
2016-08-04 08:02:45 -04:00
Ray Schamp
a0ba19a2c1 Force SVG mimetype 2016-05-31 10:42:54 -04:00
Ray Schamp
1322e25cc2 Upload svgs with MIME type image/svg+xml
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.
2016-05-20 11:36:10 -04:00
Ray Schamp
acf0f1c298 Merge pull request #486 from rschamp/bugfix/remove-tag
Remove tag target
2016-05-17 16:27:13 -04:00
Ray Schamp
82f3f5782c Remove tag target
Missed this when we moved that task to webpack.
2016-05-17 13:56:38 -04:00
Ray Schamp
b0b520fe18 Lint JSON, expand and simplify lint step 2016-05-16 13:02:55 -04:00
Ray Schamp
dd1c2c1627 Use s3cmd to sync with S3 2016-04-29 15:52:15 -04:00
Ray Schamp
669a8c9ae3 Mark version with webpack 2016-04-28 15:40:50 -04:00
Matthew Taylor
2eb62e8ab3 move component convention back to what it was
formerly presentation components such as `navigation` and `footer` have been nested, and renamed to `container` inside their respective component subdirs
2016-04-21 18:13:21 -04:00
Matthew Taylor
9b52097c38 Update lint paths for new component structure 2016-04-21 16:49:32 -04:00
Ray Schamp
ff70324fb5 Use s3 module to deploy to S3 2016-04-19 16:35:51 -04:00
Ray Schamp
303b5c44a8 Lint bin subdirectories 2016-04-19 10:47:33 -04:00
Ray Schamp
eb5edc293d Linting 2016-04-18 14:07:27 -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
de5f36b649 Add script for configuring Fastly for S3
* Builds the Pass condition based on the static directory and view routes.
* Updates Fastly with new header and conditions based on the view routes.
* Uses a nice module for interacting with fastly :)

Needs some major cleanup but it works. Hopefully Travis will work too.
2016-04-15 19:42:57 -04:00
Matthew Taylor
c448b15dd4 Refactor build-locales a bit
This makes a couple of procedure-specific parts into methods in `locale-compare`, so that they can be tested more readily.
2016-03-23 08:22:09 -04:00
Matthew Taylor
b123650988 Add localization spot checks
1. checks the localization for a few reference languages for the nav bar
2. for our localized pages (splash, about, wedo2), it checks to see that there are locale strings, whether or not they're english (to make sure at least something is on the page).
2016-03-22 16:26:16 -04: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
21668d6915 Fix tests 2016-01-06 15:08:54 -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
Ray Schamp
70a0a2d4c4 Rename version to tag to match scratch-api 2015-11-20 11:08:42 -05:00
Ray Schamp
7983d7601b Quiet EB config status check command 2015-11-20 11:07:39 -05:00
Ray Schamp
82fe07ed8b Add version.txt file to build directory on build 2015-11-20 11:07:39 -05:00
Ray Schamp
fafff50401 Merge pull request #209 from rschamp/feature/developers-developers-developers
Use webpack-dev-middleware for assets in dev
2015-11-20 11:04:10 -05:00
Ray Schamp
3afcd7fd9f Remove watch and stop targets, update README 2015-11-19 15:59:30 -05:00
Ray Schamp
c065df3faa Use webpack for static assets 2015-11-19 15:25:39 -05:00
Matthew Taylor
fc834b8817 Move scripts to new lib folder
Thanks @thisandagain for the tip!
2015-11-19 10:05:38 -05:00
Matthew Taylor
ca10232498 Clean up build-locales and add tests for it.
1. Use md5 compare instead of string compare for determining presence of translation
2. Strip out whitespace before doing md5 compare
2015-11-09 11:40:36 -05:00
Ray Schamp
b278aa05f5 Add deploy make target
Now that we send the build artifact to EB from Travis, we have to do the same thing locally.
2015-11-03 12:51:45 -05:00
Ray Schamp
07e1a96811 Test the build when we test our build
Use webpack --bail to actually return 1 when the build fails
2015-10-21 13:43:26 -04:00