Commit Graph

26 Commits

Author SHA1 Message Date
Pierre Ossman
8cfa673d94 Remove redundant "no copy" check
We also check this list as a filter to walkDir(), so no need for the
extra check here.
2019-11-11 13:32:19 +01:00
Pierre Ossman
c6e37040de Use proper backticks for generating legacy script tags 2019-11-11 10:01:43 +01:00
Pierre Ossman
0b51419ca4 Use "nomodule" instead of manual check
Very few browsers are left in the wild that supports modules but not
"nomodule", so let's simplify our handling a bit.

Safari 10 supports modules but not 'nomodule', this means that this
particular version of Safari will be broken. Due to this we have to
bump up the required Safari version to 11.
2019-09-24 15:34:59 +02:00
Pierre Ossman
2c5491e131 Enforce space after function name 2018-09-06 17:34:15 +02:00
Pierre Ossman
0ae5c54ab3 Enforce explicit semi-colons 2018-09-06 17:25:02 +02:00
Pierre Ossman
35068204f4 Enforce keyword spacing 2018-09-06 17:08:19 +02:00
Pierre Ossman
e777765320 Enforce function names 2018-09-06 16:53:40 +02:00
Pierre Ossman
7b536961b2 Enforce indentation 2018-09-06 16:37:38 +02:00
Juanjo Diaz
651c23ece3 Use fat arrow functions const foo = () => { ... }; for callbacks
and any other function that is passed around and it's not a top level function
2018-07-12 19:06:57 +02:00
Juanjo Diaz
2b5f94fa6a Prefer const/let over var 2018-05-24 00:27:09 +03:00
Juanjo Diaz
cdb860ad84 Add transpilation for IE11 and skip linux tests 2018-05-24 00:26:34 +03:00
Juanjo Diaz
8727f598c2 Add eslint and fix reported issues 2018-05-24 00:25:44 +03:00
Pierre Ossman
4a65d50d0c Only use converted modules as legacy fallback for app
Several of the major browsers now natively support modules, so we
only need the converted modules to handle older browsers. Make sure
it's only used when necessary.
2018-02-28 13:28:07 +01:00
Pierre Ossman
d584c5f624 Don't include icons Makefile when packaging 2018-01-05 16:17:29 +01:00
Pierre Ossman
be7b4e88f0 Remove intermediate files when bundling 2018-01-05 16:17:29 +01:00
Pierre Ossman
2163326888 Convert use_require.js to use promises
We had some race conditions between the callbacks that could cause
failures. Order everything properly using promises.
2018-01-05 16:17:26 +01:00
Solly Ross
a80955ee7a [infra] fix vendor import paths on built files
A previous commit started (quasi-correctly) rewriting vendor import
paths on built files.  The gist of it was correct, but it incorrectly
rewrote paths in vendor itself.

The babel plugin in use operated on canonical absolute paths.  This mean
that it saw no difference between the import
`../vendor/pako/lib/utils/foo` and `../utils/foo`, where the later was
actually in the `vendor/pako/lib/bar` directory.  This rewrote imports
in files in the vendor directory itself.  However, since those files
were *already* in the correct relative location, the new import was
incorrect by a degree of `..`.

Now, we only rewrite vendor paths on things in the `core` directory.
2017-10-03 19:30:20 -04:00
Solly Ross
c4e5a50e09 [infra] option to clean on use_require.js
This adds an option to `utils/use_require.js` which cleans the lib
and build directories before regenerating them.  This will enable us
to make sure we always have a fresh copy of the lib dir before
publishing.
2017-10-03 18:21:36 -04:00
Pierre Ossman
1524df89ad Adjust import of vendor/ modules in NPM package
We move the files in core/ up one directory level so we need to adjust
the imports from vendor libraries.
2017-07-04 10:10:36 +02:00
Pierre Ossman
d5c5b4aab7 Properly use babel opts
We prepared an options object for babel, but didn't include it properly
in the final call to babel.
2017-07-04 10:09:04 +02:00
Solly Ross
152c399513 Vendor in an IE11 polyfill for Promises
This commit introduces a polyfill to add support for Promises in IE11.
This means IE11 can be tested without first running
`utils/as_require.js`.
2017-03-21 17:39:07 -04:00
Solly Ross
adfc9d3f54 Move error handler into separate file
This commit moves the global error handler into a separate file,
so that it can catch module loading errors.

This also adds support for properly displaying error messages with
newlines in them (since the module loader may throw those)
2017-03-21 17:39:07 -04:00
Solly Ross
399fa2ee2d Optimize ES6 Module Loader Polyfill
This commit makes the ES6 module loader polyfill use Web Workers,
so that Babel doesn't block the browser from animating.  It also
uses localStorage to cache the compiled results, only recompiling
on source changes, so it makes loading faster while developing noVNC.

This includes a vendored copy of the ES6 module loader, modified as
described above.
2017-03-21 17:39:07 -04:00
Solly Ross
6cae7b58b8 Allow transforming to any format
This changes around `utils/use_require.js` to be able to generate any
of AMD (RequireJS), CommonJS, SystemJS, or UMD modules.  The three
former also include support for translating `vnc.html`, producing a full
"app" version of noVNC.
2017-03-07 11:11:28 -05:00
Solly Ross
bd5340c7ee Move input-related files into core/input
This commit moves all the input-related files from `core/`
to `core/input/`, and renames a couple as relevant
(input.js --> input/devices.js, keyboard.js --> input/util.js).
2016-09-16 15:49:52 -04:00
Solly Ross
ae510306b5 Enable noVNC to become Browserifiable
This commit restructures noVNC, splitting it into the core directory
and the app directory, with the former containing core noVNC parts,
and the latter containing parts specific to the application.
2016-09-16 15:49:51 -04:00