js compilation and packages via closure