01 - Preheat oven to 350°F. Line a 12-cup muffin tin with paper liners.
02 - In a medium bowl, whisk together flour, baking powder, baking soda, salt, cinnamon, nutmeg, and ginger until well combined.
03 - In a large bowl, beat together granulated sugar, brown sugar, oil, eggs, and vanilla extract until smooth and creamy.
04 - Gently fold the dry ingredient mixture into the wet ingredients until just combined. Do not overmix.
05 - Stir in grated carrots, and if using, nuts and raisins until evenly distributed throughout the batter.
06 - Divide batter evenly among cupcake liners, filling each about 3/4 full.
07 - Bake for 20-22 minutes, or until a toothpick inserted into the center comes out clean. Cool in the pan for 5 minutes, then transfer to a wire rack to cool completely.
08 - Beat cream cheese and butter together until creamy. Add powdered sugar, vanilla, and salt. Beat until smooth and fluffy.
09 - Once cupcakes are completely cool, frost generously with cream cheese frosting.