We describe a method for computing the history of the luminosity function in a young cluster still forming within a molecular cloud complex. Our method, which utilizes detailed results from stellar evolution theory, assumes that clusters arise from the continuous collapse of dense cloud cores over a protracted period of time. It is also assumed that stars reaching the main sequence are distributed in mass according to a prescribed initial mass function (IMF). We keep track separately of the contributions to the luminosity function from the populations of protostars, pre-main-sequence stars, and main-sequence stars. We derive expressions for the fractional contribution of these populations to both the total number of stars produced and the total cluster luminosity. In our model, the number of protostars rises quickly at first, but then levels off to a nearly constant value, which it maintains until the dispersal of the cloud complex. The number fraction of protostars always decreases with time. Averaged over the life of the parent cloud, this fraction is typically a few percent. The protostar mass distribution can be expressed as an integral over the IMF.