#!/bin/bash # # Because this project consists of a bunch of CommonJS modules, the constructors # have restricted scope. This means that they cannot be used as types in other # modules. Therefore, to permit this, we must generate an extern file containing # basic definitions of each. # # # all CamelCase modules are likely to be ctors modules=$( ls lib/ \ | sed 's/lib\/\|\.js//' \ | grep -vP '^[a-z]' ) # simple definition for now (we'll worry about members later) for module in $modules; do echo "/** @constructor */" echo "function $module() {};" echo done # finally, there's some additional useful metadata that we use to make our lives # easier, better documented and more consistent cat <