sassw: accept directory as parameter
This commit is contained in:
parent
0ffff88a7c
commit
bad53ddec4
|
@ -7,6 +7,7 @@
|
|||
# (output will automatically be INPUT with .scss changed to .css)
|
||||
|
||||
import json
|
||||
import glob
|
||||
import os
|
||||
import pyinotify
|
||||
import subprocess
|
||||
|
@ -14,6 +15,11 @@ import sys
|
|||
import time
|
||||
|
||||
filename = sys.argv[1]
|
||||
if os.path.isdir(filename):
|
||||
scss_filenames = [x for x in os.listdir(filename) if x.startswith('_') and x.endswith('.scss')]
|
||||
if not scss_filenames:
|
||||
print('Error: directory specified but no proper scss file within.', file=sys.stderr)
|
||||
filename = os.path.join(filename, scss_filenames[0])
|
||||
|
||||
def build():
|
||||
global sources, directories
|
||||
|
|
Loading…
Reference in New Issue