Pre-heat oven to 175C/325F/Gas 3, and grease a 9x13" baking pan.
In a bowl whisk egg, sugar, oil and pumpkin until light and fluffy.
In another bowl, sift together the flour, spices, salt, baking powder, and baking soda. Then add to the wet ingredients, and fold till combined.
Stir in the pecans and cranberries, if using, then pour the batter into the prepared baking pan.
Bake for 35-40 minutes until cooked through.
Transfer to a wire cooling rack to cool completely.
When the pumpkin cake is cold, add a generous layer of frosting and finish with Halloween sprinkles of your choice.