Made sassassets module create its destination directory

This commit is contained in:
Sebastian 2016-11-11 00:25:12 +01:00
parent 7193a804b3
commit a0ebf841c9
1 changed files with 4 additions and 0 deletions

View File

@ -18,6 +18,10 @@ class SassAssets(MessageMixin, RenderMixin, AssetsMixin):
source_path = os.path.join(self.asset_directory, source)
dest_path = os.path.join(output_directory, destination);
dest_dir = os.path.dirname(dest_path)
if not os.path.exists(dest_dir):
os.makedirs(dest_dir)
if os.path.isfile(source_path):
self.compile_file(source_path, dest_path)
else: