define library from javascript to include dependencies