Anders Kaseorg
173c9cee42
frontend_tests: Switch from ts-node to Babel; add rewire-ts plugin.
...
This will let tests rewrite TypeScript/ES6 module bindings that would
otherwise be read-only.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-10-17 16:48:23 -07:00
Anders Kaseorg
990f08da90
dependencies: Upgrade nearly all JavaScript dependencies to latest.
...
Keep katex at 0.10.x, mini-css-extract-plugin at 0.6.x
(https://github.com/webpack-contrib/mini-css-extract-plugin/issues/417 ),
and typescript-eslint at 1.x for now. Upgrade everything else.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-09-19 12:08:52 -07:00
Anders Kaseorg
177eb2e02e
webpack: Move CSS minification to optimization stage.
...
Otherwise Bootstrap doesn’t get minified, and also the minification
state is incorrectly reflected in the webpack cache.
The Terser plugin is used by default; we need to include it explicitly
to avoid removing it.
Switch from cssnano to clean-css because it’s noticeably faster.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-09-02 21:58:13 -07:00
Anders Kaseorg
ad116cac4c
postcss: Add postcss-calc plugin.
...
As foreshadowed by commit d0634181b5
(#13115 ).
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-09-02 21:48:05 -07:00
Anders Kaseorg
9b0401b76d
package.json: Use caret ranges for more deduplication opportunities.
...
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-09-02 19:30:09 -07:00
Anders Kaseorg
e57ede9421
yarn.lock: Share duplicate packages with yarn-deduplicate.
...
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-09-02 19:30:09 -07:00
Anders Kaseorg
d312d04510
styles: Replace Sass with PostCSS.
...
It’s about as fast as node-sass (faster, according to their
benchmarks) and more flexible. Autoprefixer is neat: we can now go
delete all our -moz-, -webkit-, etc. lines and have them autogenerated
as necessary based on .browserslistrc.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-08-29 16:35:51 -07:00
Anders Kaseorg
37ece9b8e2
webpack: Replace node-sass with Dart Sass.
...
It doesn't require scripts to install, allowing us to migrate yarn to
the more secure --ignore-scripts option.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-08-26 14:35:26 -07:00
Anders Kaseorg
f54a63e2f9
webpack: Transpile JS code with Babel.
...
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-07-22 17:55:32 -07:00
Anders Kaseorg
ecfb7c6a7f
lint: Add TypeScript compiler as a linter.
...
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-07-22 17:55:18 -07:00
Anders Kaseorg
06aa87296c
dependencies: Upgrade eslint to 6.0.1.
...
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-07-20 16:12:51 -07:00
Vinit Singh
86073588be
dependencies: Upgrade jquery-autosize 1.17.7 to autosize 4.0.2.
...
The API for the autosize library changed upstream, so several changes
had to be made to relevant js files for a successful upgrade.
Resolves #12695 .
2019-07-18 14:33:16 -07:00
Anders Kaseorg
953b69e5ea
dependencies: Upgrade simplebar to 4.1.0.
...
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-07-18 12:19:55 -07:00
Anders Kaseorg
ab89f40a66
generate-custom-icon-webfont: Replace with webpack webfonts-loader.
...
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-07-18 12:00:00 -07:00
Anders Kaseorg
218c60ae86
third: Upgrade spectrum-colorpicker to 1.8.0 from NPM.
...
We had several patches to spectrum, but the only essential one
(0ea770fc18
) had already been fixed upstream,
and another was just handling jQuery deprecation warnings for not yet removed features.
See #12749 for details.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-07-10 10:07:34 -07:00
Anders Kaseorg
5f3d36ae87
tex: Bundle KaTeX CLI using Webpack.
...
We don’t need a hacked copy anymore. We run the installed version out
of node_modules in development, and a Webpack-bundled version of that
in production.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-07-02 16:50:03 -07:00
Anders Kaseorg
f346d0e511
dependencies: Use core-js for String.prototype polyfills.
...
It seems like the de facto standard ES polyfill library these days,
and we already depend on it through simplebar.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-07-02 16:50:03 -07:00
Thomas Ip
8c199fd44c
webpack: Use handlebars-loader to handle frontend templates.
...
And remove the compile-handlebars-templates system.
2019-07-02 16:23:29 -07:00
Anders Kaseorg
438c7c46ed
third: Get jquery-caret-plugin from NPM.
...
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-07-02 15:04:58 -07:00
Anders Kaseorg
1647582acf
third: Get jquery-autosize from NPM.
...
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-07-02 15:04:58 -07:00
Anders Kaseorg
b255b90188
package.json: Realphabetize dependencies.
...
`yarn add` does this for you…
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-07-02 15:04:58 -07:00
Anders Kaseorg
f407a12ba2
test-documentation: Validate HTML with vnu.jar.
...
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-06-27 14:53:21 -07:00
Thomas Ip
637b2b784a
dependencies: Upgrade mini-css-extract-plugin to 0.6.0 and use HMR.
...
Given mini-css-extract-plugin can now do hot module replacement,
this commit also removed css-hot-loader. Not upgrading to 0.7.0
as that cause webpack to crash.
2019-06-24 17:58:51 -07:00
Thomas Ip
413c3066f0
dependencies: Upgrade to ts-loader 6.0.2.
2019-06-24 17:58:27 -07:00
Thomas Ip
1c99cb320e
dependencies: Upgrade swagger-parser to 6.0.5.
...
4.0.0 changed how options worked but we didn't use that so no
changes needed.
2019-06-24 17:58:27 -07:00
Thomas Ip
6f2a909e22
dependencies: Upgrade style-lint to 10.0.1.
2019-06-24 17:58:27 -07:00
Thomas Ip
308d7bb8f5
dependencies: Upgrade cache-loader to 4.0.0.
2019-06-24 17:58:27 -07:00
Thomas Ip
90a011a3c4
dependencies: Upgrade nyc to 14.1.1.
2019-06-24 17:58:26 -07:00
Thomas Ip
7738273e5a
dependencies: Upgrade style-loader to 0.23.1.
2019-06-24 17:58:26 -07:00
Thomas Ip
380114d709
dependencies: Upgrade lazysizes to 5.1.0.
2019-06-24 17:58:26 -07:00
Thomas Ip
1bfb5e48fe
dependencies: Upgrade file-loader to 4.0.0.
2019-06-24 17:58:26 -07:00
Thomas Ip
e17fb33b47
dependencies: Upgrade katex to 0.10.2.
...
The markup output changed but the rendering is the same, so modified
expected output in tests.
There is a regression introduced in one of the new versions of KaTeX,
which produces a warning in our node tests:
```
No character metrics for ' ' in style 'Main-Bold'
```
but the rendering is correct so we can ignore it.
Tracking issue: KaTeX/KaTeX#1994
Fixes #12472 .
2019-06-24 17:58:26 -07:00
Thomas Ip
8fd55cea9d
dependencies: Upgrade jsdom to 15.1.1.
2019-06-24 17:58:26 -07:00
Thomas Ip
f92d244930
dependencies: Remove cssstyle, htmlparser2, nwmatcher & xmlhttprequest.
...
All of these are no longer needed.
2019-06-24 17:58:26 -07:00
Thomas Ip
aabf041d69
dependencies: Upgrade css-loader to 2.1.1.
2019-06-24 17:58:26 -07:00
Thomas Ip
caa860f7a2
dependencies: Upgrade @types/node to 12.0.7.
2019-06-24 17:58:26 -07:00
Thomas Ip
e3ab233a68
dependencies: Upgrade webpack to 4.33.0.
2019-06-24 17:58:26 -07:00
Thomas Ip
d1d06af2c6
dependencies: Upgrade jQuery to 3.4.1.
...
API changes:
* Positional selectors (eg :first, :eq) are deprecated in 3.4.0 and
will be removed in 4.0. Use positional methods instead.
2019-06-06 15:21:26 -07:00
Priyank Patel
ceff7e51bd
package.json: Remove webpack-cache after installing dependencies.
...
This is recommended by webpack's cache-loader.
2019-06-03 20:15:51 -07:00
Priyank Patel
e590ce95ea
dependencies: Add cache-loader for webpack build caching.
2019-06-03 20:15:51 -07:00
Thomas Ip
3b105921bb
dependencies: Upgrade winchan to 0.2.1.
2019-06-03 12:24:00 -07:00
Thomas Ip
537014ee47
dependencies: Upgrade typescript to 3.5.1.
2019-06-03 12:24:00 -07:00
Thomas Ip
be48eb165d
dependencies: Upgrade webpack-dev-server to 3.5.1 and install types.
2019-06-03 12:24:00 -07:00
Thomas Ip
545508da7b
dependencies: Upgrade webpack(-cli) to 4.32.2 (3.3.2).
...
webpack 4.20.0 require webpack-cli 3.1.1.
2019-06-03 12:24:00 -07:00
Thomas Ip
4097025df7
dependencies: Upgrade svgo to 1.2.2.
2019-06-03 12:24:00 -07:00
Thomas Ip
19d18bdfbb
dependencies: Upgrade source-sans-pro to 2.45.0.
2019-06-03 12:24:00 -07:00
Thomas Ip
57e9b21d90
dependencies: Remove source-map-loader.
...
The loader is not currently used.
2019-06-03 12:24:00 -07:00
Thomas Ip
238ea25fca
dependencies: Upgrade sortablejs to 1.9.0.
...
Also set it to concrete version.
2019-06-03 12:24:00 -07:00
Thomas Ip
eccd258407
dependencies: Upgrade sass-loader to 7.1.0.
...
v7.1.0 allows the loader to use any sass implementation. The new
reference implementation of sass, dart-sass, is faster than libsass
in toy benchmarks but perform about the same when compiling
bootstrap. So we will stay on libsass for now.
2019-06-03 12:24:00 -07:00
Thomas Ip
37b0b0f246
dependencies: Upgrade plotly.js to 1.48.1.
...
v1.41.0 introduced the {resposive: true} option, we could use it.
2019-06-03 12:24:00 -07:00