Leo McArdle
785bcdabe1
handle assets in pre-rendering
2022-10-14 16:53:49 +03:00
Leo McArdle
b05b8eb3b7
add svelte html pre-rendering
2022-10-14 16:53:49 +03:00
Leo McArdle
3800193c73
svelte scaffolding for contribute pages ( #5019 )
2022-10-14 16:53:49 +03:00
Ryan Johnson
05b454ea97
fix showfor on revision pages ( #5153 )
...
* fix showfor on revision pages
* incorporate feedback
2022-06-17 08:06:13 -07:00
Tasos Katsoulas
75e9dab233
Trigger build after GH saml.
2022-05-05 12:11:21 +03:00
Tasos Katsoulas
541d9a7faa
Use nonce for script-src
2022-05-04 16:10:33 +03:00
Leo McArdle
4703755e26
support windows 11 in browserdetect ( #4998 )
...
rewrite BrowserDetect to support multiple detection methods (ua, hints, remote troubleshooting)
rewrite AAQSystemInfo to remove duplicated UA parsing, and rely on BrowserDetect instead
modify RemoteTroubleshooting to use async
remove unused/unusable fields from AAQ config (device and plugins)
https://github.com/mozilla/sumo/issues/966
2022-03-15 13:53:42 +00:00
Leo McArdle
f96a54adce
upgrade node to lts, and upgrade dependencies ( #4977 )
...
remove unused dependencies
2022-01-11 15:43:26 +00:00
Leo McArdle
4ca5c12e4a
replace nunjucks_precompile with webpack loader ( #4981 )
...
https://github.com/mozilla/sumo/issues/972
2022-01-06 16:55:27 +00:00
Leo McArdle
59ddb253fe
reduce js loaded on wiki documents ( #4980 )
...
reduce from 705KB to 302KB minified but uncompressed
2022-01-05 17:53:42 +00:00
Leo McArdle
5ddcb2c68e
remove globals from eslint config not being used any more
2021-12-17 17:12:18 +00:00
Leo McArdle
97a7514315
fix tests to work with webpack
...
run tests through webpack first, then mocha
reorganise webpack config files
2021-12-17 12:51:02 +00:00
Leo McArdle
8e66941f01
remove showfor from global scope
2021-12-17 12:51:02 +00:00
Leo McArdle
a0607bd898
remove Modernizr
2021-12-17 12:51:02 +00:00
Leo McArdle
ac69c6c521
remove rickshaw entrypoint, importing it instead
2021-12-17 12:51:02 +00:00
Leo McArdle
b9e244ed50
remove remoteTroubleshooting from global scope
2021-12-17 12:51:02 +00:00
Leo McArdle
031054affa
remove AAQSystemInfo from global scope
2021-12-17 12:51:02 +00:00
Leo McArdle
3d078070de
remove Marky from global scope
2021-12-17 12:51:02 +00:00
Leo McArdle
5d65503a2a
remove BrowserDetect from global scope
2021-12-17 12:51:02 +00:00
Leo McArdle
9355b502a3
remove k from global scope
2021-12-17 12:51:02 +00:00
Leo McArdle
f258bc1808
import protocol everywhere it's required
...
move imports into one file to make this easier, currently the design of protocol makes it unfeasible to import a specific module rather than the whole lot
2021-12-17 12:51:02 +00:00
Leo McArdle
1e3f86fa61
remove KBox from the global scope
2021-12-17 12:51:02 +00:00
Leo McArdle
5c2a1b715b
remove helpers for exporting variables globally
2021-12-17 12:51:02 +00:00
Leo McArdle
5ce83cf8eb
remove diff_match_patch_uncompressed library from global scope
2021-12-17 12:51:02 +00:00
Leo McArdle
dc6c36855b
remove dialogSet from global scope
...
move function into seperate file to avoid circular import
2021-12-17 12:51:02 +00:00
Leo McArdle
125da2df38
remove trackEvent from global scope
2021-12-17 12:51:02 +00:00
Leo McArdle
31db63110b
remove CodeMirror from global scope
2021-12-17 12:51:02 +00:00
Leo McArdle
f9efd98021
remove detailsInit and tabsInit from global scope
2021-12-17 12:51:02 +00:00
Leo McArdle
731420670e
remove nunjucks from the global scope
2021-12-17 12:51:02 +00:00
Leo McArdle
763334448f
remove Rickshaw from global scope
2021-12-17 12:51:02 +00:00
Leo McArdle
5728bba2a2
remove Mozilla.UITour from global scope
2021-12-17 12:51:02 +00:00
Leo McArdle
6d953ef8ea
remove _dntEnabled from global scope
...
update dnt-helper.js from source, move into libs folder
2021-12-17 12:51:02 +00:00
Leo McArdle
6b7aed4f1d
remove URLify from global scope
2021-12-17 12:51:02 +00:00
Leo McArdle
f18c0e9c4d
only import required underscore functions
...
this requires updating the library
2021-12-17 12:51:02 +00:00
Leo McArdle
4ecb30b8ea
import jquery (automatically), jquery-ui and jquery plugins
...
this allows webpack to handle our dependency tree for jquery and jquery-related modules, rather than requiring us to do it manually
2021-12-17 12:51:02 +00:00
Leo McArdle
458e03e275
remove eslint-disable-line comments
2021-12-17 12:51:02 +00:00
Leo McArdle
1446f60f9c
lint js for various import related rules, add to pre-commit
2021-12-17 12:51:02 +00:00
Leo McArdle
4dbcc061b1
update eslint to support es2021 syntax
2021-12-17 12:51:02 +00:00
Leo McArdle
5e97a990f4
dedupe chunks across common and other entrypoints
...
this also solves problems with imported side-effects being executed multiple times when imported in multiple chunks
2021-12-17 12:51:02 +00:00
Leo McArdle
e25c549972
fix webpack imports in mocha tests
...
https://github.com/mozilla/sumo-project/issues/895
2021-12-16 11:23:17 +00:00
Leo McArdle
e016a742ba
enable loading images from webpack in django
2021-12-16 11:23:17 +00:00
Leo McArdle
3134dec758
Merge branch 'master' into webpack
2021-10-18 13:56:24 +01:00
Leo McArdle
4b6326c378
remove moment.js from webpack ( #4856 )
...
https://github.com/mozilla/sumo-project/issues/921
2021-08-04 12:38:45 +01:00
Leo McArdle
ad1c65377d
apply babel to all js files ( #4853 )
...
rename *.es6 files back to *.js
https://github.com/mozilla/sumo-project/issues/879
2021-07-27 09:40:10 +01:00
Leo McArdle
d6243fc75e
remove jquery-migrate from webpack entrypoint config ( #4837 )
...
the file doesn't exist, and we've been running fine without it for at least 2 years
https://github.com/mozilla/sumo-project/issues/881
2021-07-13 12:32:24 +01:00
Leo McArdle
e15e1595ff
run webpack build in docker
...
remove frontend-base image, do everything in staticfiles image
add STATIC_URL_WEBPACK to jinja context for use by webpack html entrypoint files
2021-07-13 10:57:39 +01:00
Leo McArdle
0e513ef754
load stylesheets through webpack
...
support stylesheet source maps
2021-07-12 16:37:48 +01:00
Leo McArdle
8c774bec27
expose globals in webpack
...
this should get our js working properly
over time we can go through and remove these vars from the global scope,
instead importing them only in the files they're needed,
and take full advantage of what webpack has to offer
2021-07-12 16:37:48 +01:00
Leo McArdle
67bebd8f8f
add basic webpack config, using previously defined entrypoints
...
load all javascript through webpack - it's mostly broken because we haven't exposed globals yet - that's our next step
2021-07-12 16:37:48 +01:00
Leo McArdle
17ca00e233
use eslint to find globals we need to add to webpack ( #4826 )
...
fix some js not using var where it should
2021-06-21 13:08:36 +01:00