comparison libervia/server/tasks/implicit/task_sass.py @ 1509:106bae41f5c8

massive refactoring from camelCase -> snake_case. See backend commit log for more details
author Goffi <goffi@goffi.org>
date Sat, 08 Apr 2023 13:44:11 +0200
parents 2f6dac783c8e
children
comparison
equal deleted inserted replaced
1508:ec3ad9abf9f9 1509:106bae41f5c8
41 if 'node-sass' not in package.setdefault('dependencies', {}): 41 if 'node-sass' not in package.setdefault('dependencies', {}):
42 package['dependencies']['node-sass'] = 'latest' 42 package['dependencies']['node-sass'] = 'latest'
43 with package_path.open('w') as f: 43 with package_path.open('w') as f:
44 json.dump(package, f, indent=4) 44 json.dump(package, f, indent=4)
45 45
46 cmd = self.findCommand('yarnpkg', 'yarn') 46 cmd = self.find_command('yarnpkg', 'yarn')
47 await self.runCommand(cmd, 'install', path=str(d_path)) 47 await self.runCommand(cmd, 'install', path=str(d_path))
48 48
49 self.WATCH_DIRS = list(sass_dirs) 49 self.WATCH_DIRS = list(sass_dirs)
50 50
51 async def onDirEvent(self, host, filepath, flags): 51 async def on_dir_event(self, host, filepath, flags):
52 if filepath.suffix in SASS_SUFFIXES: 52 if filepath.suffix in SASS_SUFFIXES:
53 await self.manager.runTaskInstance(self) 53 await self.manager.run_task_instance(self)
54 54
55 async def start(self): 55 async def start(self):
56 d_path = self.resource.dev_build_path 56 d_path = self.resource.dev_build_path
57 node_sass = d_path / 'node_modules' / 'node-sass' / 'bin' / 'node-sass' 57 node_sass = d_path / 'node_modules' / 'node-sass' / 'bin' / 'node-sass'
58 for browser_path in self.resource.browser_modules['themes_browser_paths']: 58 for browser_path in self.resource.browser_modules['themes_browser_paths']: