sassw: get events correctly when launched from a path != scss path
This commit is contained in:
parent
e107c8e210
commit
5dae5dacab
|
@ -17,7 +17,8 @@ filename = sys.argv[1]
|
|||
def build():
|
||||
global sources, directories
|
||||
subprocess.call(['sassc', '-mauto', filename, filename.replace('.scss', '.css')])
|
||||
sources = [os.path.abspath(x) for x in json.load(open(filename.replace('.scss', '.css.map')))['sources']]
|
||||
basepath = os.path.abspath(os.path.dirname(filename))
|
||||
sources = [os.path.abspath(os.path.join(basepath, x)) for x in json.load(open(filename.replace('.scss', '.css.map')))['sources']]
|
||||
directories = set([os.path.dirname(x) for x in sources])
|
||||
|
||||
class EventManager(pyinotify.ProcessEvent):
|
||||
|
|
Loading…
Reference in New Issue