User Tools

Site Tools


journal:201212

This is an old revision of the document!


12월 2일

coffeescript 를 사용하면 고치고 빌드하고 브라우져 다시 읽기 하는게 번거롭다. 그래서 livereload 를 사용하는데, 리눅스에는 루비 버전만 있었다.

그러다 오늘 python 버전 livereload 가 있길래 설치를 했는데, coffeescript 스크립트를 지원하지 앟는다. livereload 모듈의 compile.py 에 다음줄 추가. 수정한건 딱 2줄.

class CoffeeCompiler(_CommandCompiler):
    command = 'coffee'
    command_options = '--compile'

def coffeec(path, output, mode='w'):
    def _compile(path, output, mode):
        c = CoffeeCompiler(path)
        if mode == 'a':
            c.append(output)
            return
        c.write(output)
        return
    return functools.partial(_compile, path, output, mode)
journal/201212.1354464535.txt.gz · Last modified: 2018/07/18 14:09 (external edit)