From 02d19d48fc7d50acf8435b5f49fa9c5cfabf74e0 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Thu, 27 Jun 2019 14:42:16 -0700 Subject: [PATCH] tooling: Remove static/node_modules symlink. It appears not to have been useful and makes it marginally harder to reason about how module resolution works. Paths to static content in node_modules should be resolved through Webpack instead. (This node_modules symlink was originally created in the pre-webpack world where all of our static asset paths were based in static/.) Signed-off-by: Anders Kaseorg --- static/js/settings_account.js | 2 +- static/node_modules | 1 - zproject/settings.py | 4 ++-- 3 files changed, 3 insertions(+), 4 deletions(-) delete mode 120000 static/node_modules diff --git a/static/js/settings_account.js b/static/js/settings_account.js index 4dd14e98d5..b6fb153002 100644 --- a/static/js/settings_account.js +++ b/static/js/settings_account.js @@ -312,7 +312,7 @@ exports.set_up = function () { if (page_params.development_environment) { // Usually the Django templates handle this path stuff // for us, but in this case we need to hardcode it. - zxcvbn_path = '/static/node_modules/zxcvbn/dist/zxcvbn.js'; + zxcvbn_path = '/webpack/zxcvbn.js'; } $.getScript(zxcvbn_path, function () { $('#pw_strength .bar').removeClass("fade"); diff --git a/static/node_modules b/static/node_modules deleted file mode 120000 index ea095f3ded..0000000000 --- a/static/node_modules +++ /dev/null @@ -1 +0,0 @@ -../node_modules/ \ No newline at end of file diff --git a/zproject/settings.py b/zproject/settings.py index 9ab43da448..efe30bed09 100644 --- a/zproject/settings.py +++ b/zproject/settings.py @@ -934,7 +934,7 @@ JS_SPECS = { # for bundling KaTeX. 'katex': { 'source_filenames': [ - 'node_modules/katex/dist/katex.js', + '../node_modules/katex/dist/katex.js', ], 'output_filename': 'min/katex.js', }, @@ -943,7 +943,7 @@ JS_SPECS = { # good way to look up the path to the file). 'zxcvbn': { 'source_filenames': [ - 'node_modules/zxcvbn/dist/zxcvbn.js', + '../node_modules/zxcvbn/dist/zxcvbn.js', ], 'output_filename': 'min/zxcvbn.js' },