Open kristianmandrup opened 7 years ago
Currently working on a major refactoring to allow for:
test 'with named append' -> const find = """ class[key=#Hello] body[type=#ClassBody] """ const replace = """ {{ .body | append:fn }} """ const code = '''class Hello { }''' const replacer = grasp.replace 'squery', {find, replace } const result = replacer.replace(code, [{ action: 'append', name: 'fn', node: { type: 'Raw', raw: 'hello () { }' } }]) const expected = """class Hello { hello () { } }""" equal (result, expected)
Currently working on a major refactoring to allow for: