Skip to content

Commit

Permalink
Remove pystache dependency
Browse files Browse the repository at this point in the history
And use the mustache node module instead.
  • Loading branch information
fredj committed Aug 26, 2015
1 parent 7b9828a commit 15ef7ee
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -323,5 +323,5 @@ build/test_rendering_requires.js: $(SPEC_RENDERING_JS)
@mkdir -p $(@D)
@node tasks/generate-requires.js $^ > $@

%shader.js: %.glsl src/ol/webgl/shader.mustache bin/pyglslunit.py
@python bin/pyglslunit.py --input $< --template src/ol/webgl/shader.mustache --output $@
%shader.js: %.glsl src/ol/webgl/shader.mustache bin/pyglslunit.py build/timestamps/node-modules-timestamp
@python bin/pyglslunit.py --input $< | ./node_modules/.bin/mustache - src/ol/webgl/shader.mustache > $@
5 changes: 2 additions & 3 deletions bin/pyglslunit.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/usr/bin/python

from optparse import OptionParser
import json
import re
import sys

import pystache


ESCAPE_SEQUENCE = {
Expand Down Expand Up @@ -42,7 +42,6 @@ def main(argv):
option_parser = OptionParser()
option_parser.add_option('--input')
option_parser.add_option('--output')
option_parser.add_option('--template')
options, args = option_parser.parse_args(argv[1:])

context = {}
Expand Down Expand Up @@ -114,7 +113,7 @@ def main(argv):
output = open(options.output, 'wb')
else:
output = sys.stdout
output.write(pystache.render(open(options.template, 'rb').read(), context))
json.dump(context, output)


if __name__ == '__main__':
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
"jshint": "2.5.6",
"mocha": "1.21.5",
"mocha-phantomjs": "3.5.1",
"mustache": "2.1.3",
"phantomjs": "1.9.10",
"proj4": "2.3.6",
"resemblejs": "1.2.0",
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
http://closure-linter.googlecode.com/files/closure_linter-latest.tar.gz
pystache

0 comments on commit 15ef7ee

Please sign in to comment.