Mercurial > libervia-web
comparison libervia/server/tasks/implicit/task_js_modules.py @ 1273:10748aa888a9
tasks (js_modules, sass): check for `yarnpkg` before `yarn`, as it is the name used in Debian
author | Goffi <goffi@goffi.org> |
---|---|
date | Tue, 26 May 2020 12:33:09 +0200 |
parents | 0b269d4a46a3 |
children | 2f6dac783c8e |
comparison
equal
deleted
inserted
replaced
1272:3a3f3bccd65b | 1273:10748aa888a9 |
---|---|
23 package = js_data.get('package', {}) | 23 package = js_data.get('package', {}) |
24 package_path = self.build_path / 'package.json' | 24 package_path = self.build_path / 'package.json' |
25 with package_path.open('w') as f: | 25 with package_path.open('w') as f: |
26 json.dump(package, f) | 26 json.dump(package, f) |
27 | 27 |
28 try: | 28 cmd = self.findCommand('yarnpkg', 'yarn', 'npm') |
29 cmd = self.findCommand('yarn') | |
30 except exceptions.NotFound: | |
31 cmd = self.findCommand('npm') | |
32 await self.runCommand(cmd, 'install', path=str(self.build_path)) | 29 await self.runCommand(cmd, 'install', path=str(self.build_path)) |
33 | 30 |
34 try: | 31 try: |
35 brython_map = js_data['brython_map'] | 32 brython_map = js_data['brython_map'] |
36 except KeyError: | 33 except KeyError: |