-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
webpack: add aliases support #123
Conversation
// Semantic-UI LESS config resolving alias | ||
// TODO: This would be better injected via config from Flask... | ||
"../../theme.config$": path.resolve(config.build.context, "less/invenio_theme/theme.config"), | ||
...aliases, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would remove the @templates
now, and move it to a Invenio RDM config
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: adding this method to inject Webpack aliases doesn't cancel out inveniosoftware/pywebpack#27, which can still be useful for generally adding aliases. |
Tests seem to be failing because Flask-WebpackExt docs are not properly built? |
@slint we. had that issue several times during the sprint. read the docs are built in py27 in many cases. If you change it to python 3 they built again properly. |
def dependencies(self): | ||
"""Proxy to the active theme's bundle dependencies.""" | ||
return self._active_theme_bundle.dependencies | ||
def __getattr__(self, attr): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one is causing troubles with tests in Invenio-Theme:
__________________ ERROR collecting invenio_theme/webpack.py ___________________
450/opt/python/3.7.1/lib/python3.7/doctest.py:932: in find
451 self._find(tests, obj, name, module, source_lines, globs, {})
452../../../virtualenv/python3.7.1/lib/python3.7/site-packages/_pytest/doctest.py:476: in _find
453 self, tests, obj, name, module, source_lines, globs, seen
454/opt/python/3.7.1/lib/python3.7/doctest.py:991: in _find
455 if ((inspect.isroutine(inspect.unwrap(val))
456../../../virtualenv/python3.7.1/lib/python3.7/site-packages/_pytest/doctest.py:427: in _mock_aware_unwrap
457 return real_unwrap(obj, stop=_is_mocked)
458/opt/python/3.7.1/lib/python3.7/inspect.py:511: in unwrap
459 while _is_wrapper(func):
460/opt/python/3.7.1/lib/python3.7/inspect.py:505: in _is_wrapper
461 return hasattr(f, '__wrapped__') and not stop(f)
462../../../virtualenv/python3.7.1/lib/python3.7/site-packages/invenio_assets/webpack.py:65: in __getattr__
463 return getattr(self._active_theme_bundle, attr)
464../../../virtualenv/python3.7.1/lib/python3.7/site-packages/invenio_assets/webpack.py:56: in _active_theme_bundle
465 themes = current_app.config.get('APP_THEME', [])
466../../../virtualenv/python3.7.1/lib/python3.7/site-packages/werkzeug/local.py:347: in __getattr__
467 return getattr(self._get_current_object(), name)
468../../../virtualenv/python3.7.1/lib/python3.7/site-packages/werkzeug/local.py:306: in _get_current_object
469 return self.__local()
470../../../virtualenv/python3.7.1/lib/python3.7/site-packages/flask/globals.py:52: in _find_app
471 raise RuntimeError(_app_ctx_err_msg)
472E RuntimeError: Working outside of application context.
473E
474E This typically means that you attempted to use functionality that needed
475E to interface with the current application object in some way. To solve
476E this, set up an application context with app.app_context(). See the
477E documentation for more information.
No description provided.