Skip to content

Commit

Permalink
added header to generated code
Browse files Browse the repository at this point in the history
  • Loading branch information
Evan Wallace committed Jun 2, 2011
1 parent 5f5e2b9 commit 970e9f7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@

import re, os, sys, time, tempfile

header = '''/*
* glfx.js
* http://evanw.github.com/glfx.js/
*
* Copyright 2011 Evan Wallace
* Released under the MIT license
*/
'''

def sources():
return [os.path.join(base, f) for base, folders, files in \
os.walk(input_path) for f in files if f.endswith('.js')]
Expand Down Expand Up @@ -39,6 +48,7 @@ def build():
data = open(temp2_path).read()
os.remove(temp2_path)
data = compress_glsl(data)
data = header + data
open(output_path, 'w').write(data)
print 'built %s (%u lines)' % (output_path, len(data.split('\n')))

Expand Down

0 comments on commit 970e9f7

Please sign in to comment.