Mercurial > libervia-web
changeset 1434:2f6dac783c8e
tasks(js_modules, sass): remove support for `npm`:
`npm` cause trouble during installation, and it will be resource cousuming to find the
source and maintain it in addition to `yarn`, thus `yarn` is for now kept and the only
supported NodeJS package manager.
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 09 Jun 2021 16:50:07 +0200 |
parents | 1a5410981c45 |
children | 396d5606477f |
files | libervia/server/tasks/implicit/task_js_modules.py libervia/server/tasks/implicit/task_sass.py |
diffstat | 2 files changed, 3 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/libervia/server/tasks/implicit/task_js_modules.py Sun Jun 06 19:40:07 2021 +0200 +++ b/libervia/server/tasks/implicit/task_js_modules.py Wed Jun 09 16:50:07 2021 +0200 @@ -16,7 +16,7 @@ async def prepare(self): if "js" not in self.resource.browser_modules: - raise exceptions.CancelError(f"No JS module needed") + raise exceptions.CancelError("No JS module needed") async def start(self): js_data = self.resource.browser_modules['js'] @@ -25,7 +25,7 @@ with package_path.open('w') as f: json.dump(package, f) - cmd = self.findCommand('yarnpkg', 'yarn', 'npm') + cmd = self.findCommand('yarnpkg', 'yarn') await self.runCommand(cmd, 'install', path=str(self.build_path)) try:
--- a/libervia/server/tasks/implicit/task_sass.py Sun Jun 06 19:40:07 2021 +0200 +++ b/libervia/server/tasks/implicit/task_sass.py Wed Jun 09 16:50:07 2021 +0200 @@ -1,11 +1,8 @@ #!/ur/bin/env python3 import json -from pathlib import Path -from sat.core.i18n import _ from sat.core.log import getLogger from sat.core import exceptions -from libervia.server.constants import Const as C from libervia.server.tasks import task @@ -46,7 +43,7 @@ with package_path.open('w') as f: json.dump(package, f, indent=4) - cmd = self.findCommand('yarnpkg', 'yarn', 'npm') + cmd = self.findCommand('yarnpkg', 'yarn') await self.runCommand(cmd, 'install', path=str(d_path)) self.WATCH_DIRS = list(sass_dirs)