Commit Graph

9 Commits

Author SHA1 Message Date
Rob Wu
d253889d97 __non_webpack_require__ -> require in SystemJS
When running browser tests, e.g. via `gulp unittest`, the test files are not
processed by babel, and neither by the "unittestcli" gulp target.

This commit copies the babelPluginReplaceNonWebPackRequire plugin from the
unittestcli target to the SystemJS config so that `__non_webpack_require__` is
replaced with `require` for all build targets, and adds a unit test to ensure
that this indeed works as expected.
2017-08-15 12:14:30 +02:00
Jonas Jenwald
be36c60e0f Polyfill Uint8ClampedArray using core-js
https://github.com/zloirock/core-js
2017-08-14 16:19:55 +02:00
Jonas Jenwald
4a906955c4 Fix the remaining cases of inconsistent spacing and trailing commas in objects, and enable the comma-dangle and object-curly-spacing ESLint rules
http://eslint.org/docs/rules/comma-dangle
http://eslint.org/docs/rules/object-curly-spacing

*Please note:* This patch was created automatically, using the ESLint `--fix` command line option. In a couple of places this caused lines to become too long, and I've fixed those manually; please refer to the interdiff below for the only hand-edits in this patch.

```diff
diff --git a/gulpfile.js b/gulpfile.js
index d18b9c58..7d47fd8d 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -1247,7 +1247,8 @@ gulp.task('gh-pages-git', ['gh-pages-prepare', 'wintersmith'], function () {
   var reason = process.env['PDFJS_UPDATE_REASON'];

   safeSpawnSync('git', ['init'], { cwd: GH_PAGES_DIR, });
-  safeSpawnSync('git', ['remote', 'add', 'origin', REPO], { cwd: GH_PAGES_DIR, });
+  safeSpawnSync('git', ['remote', 'add', 'origin', REPO],
+                { cwd: GH_PAGES_DIR, });
   safeSpawnSync('git', ['add', '-A'], { cwd: GH_PAGES_DIR, });
   safeSpawnSync('git', [
     'commit', '-am', 'gh-pages site created via gulpfile.js script',
```
2017-06-03 23:35:37 +02:00
Yury Delendik
66c8893815 Removes last UMDs from the modules. 2017-05-31 07:14:17 -05:00
Evadne Wu
50af2284aa
amends Babel cache (#8364) implementation to disable caching on Safari
- the viewer was not loading in development mode on Safari, due to Safari
  having crypto.webkitSubtle instead of crypto.subtle.

- the isCachingPossible check was amended to check for crypro.subtle
  which is currently not in Safari but in Firefox and Chrome. This
  essentially works around the issue by disabling caching for Safari
  in development mode.

- maintainer sentiment: people who develop on Safari can get this speedup
  once Safari drops prefix for SubtleCrypto.

- note: at time of writing Safari Version 10.1 (12603.1.30.0.34) has an
  issue where caching can be enabled for PDF.js but must to be disabled for
  worker, otherwise the two sides do not communicate.

- https://github.com/mozilla/pdf.js/pull/8387#issuecomment-299709961
- https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/digest
2017-05-07 18:00:30 +01:00
Yury Delendik
bbb2cc000e Adds babel caching for system.js. 2017-05-02 19:28:03 -05:00
Jonas Jenwald
52e3de3c0a Convert the files in the /src/display folder to ES6 modules
Also disables ES2015 transpilation in development mode.
2017-04-16 12:19:10 +02:00
Yury Delendik
25873e92f0 Enable babel translation to enable ES module support. 2017-03-27 07:25:09 -05:00
Yury Delendik
5b50e0d414 Replaces RequireJS to SystemJS. 2017-02-27 08:32:39 -06:00