# HG changeset patch # User Goffi # Date 1717146602 -7200 # Node ID 29eb1ea35869e7ccb1bd5ff6740b099bd05c08e3 # Parent 64bfb6554131d82728ba5c84515de85a9141daf4 taks (sass): replace deprecated `node-sass` by `sass`. diff -r 64bfb6554131 -r 29eb1ea35869 libervia/web/server/tasks/implicit/task_sass.py --- a/libervia/web/server/tasks/implicit/task_sass.py Thu May 30 23:56:05 2024 +0200 +++ b/libervia/web/server/tasks/implicit/task_sass.py Fri May 31 11:10:02 2024 +0200 @@ -38,8 +38,8 @@ except Exception as e: log.error(f"Unexepected exception while parsing package.json: {e}") - if 'node-sass' not in package.setdefault('dependencies', {}): - package['dependencies']['node-sass'] = '9.0.0' + if 'sass' not in package.setdefault('dependencies', {}): + package['dependencies']['sass'] = '^1.77' with package_path.open('w') as f: json.dump(package, f, indent=4) @@ -54,16 +54,17 @@ async def start(self): d_path = self.resource.dev_build_path - node_sass = d_path / 'node_modules' / 'node-sass' / 'bin' / 'node-sass' + node_sass = d_path / 'node_modules' / 'sass' / 'sass.js' for browser_path in self.resource.browser_modules['themes_browser_paths']: for p in browser_path.iterdir(): if p.suffix not in SASS_SUFFIXES: continue await self.runCommand( str(node_sass), - "--omit-source-map-url", - "--output-style", "compressed", - "--output", str(self.build_path), + "--load-path", str(self.build_path), + "--no-source-map", + "--style", "compressed", str(p), + str(self.build_path/p.with_suffix(".css").name), path=str(self.build_path) )