meta_join.py revision 2e7bfd97f3f2892388cdb8d885756c35ca73ae94
# -*- coding: utf-8 -*-
# vim: et sw=4 ts=4
try:
import json as simplejson
except:
import simplejson
SRC_DIR = '../'
SRC_SUBDIR = 'meta'
SRC_EXT = 'json'
TEMPLATE_DIR = 'template'
TEMPLATE_FILE = 'meta.js'
TEMPLATE_TOKEN = '{ /* METAGEN */ }'
DEST_DIR = 'js'
DEST_JSON = 'yui3.json'
DEST_JS = 'yui3.js'
MD5_TOKEN = '{ /* MD5 */ }'
print src_path
print dest_path
modules = {}
# module director
print dirname
# meta dir
print j
# read all [component].json files
try:
except:
print 'WARNING: could not read ' + j
# print simplejson.dumps(data, ensure_ascii=False, sort_keys=True, indent=4)
if data:
modules[k] = v
print jsonstr
# write the raw module json
# create the meta.js file from a template
print 'done'
def main():
if __name__ == '__main__':
main()