Combine the flour, baking powder, baking soda, cinnamon, ginger, nutmeg and salt in a small bowl and mix well. Set aside.
1 cup all purpose flour, 1 teaspoon baking powder, 1 teaspoon baking soda, 3/4 teaspoon cinnamon, 1/4 teaspoon ground ginger, 1/8 teaspoon ground nutmeg, 1/2 teaspoon salt
Beat the sugar, brown sugar and vegetable oil together in the bowl of an electric mixer fitted with a paddle until well combined.
1/2 cup granulated sugar, 1/4 cup brown sugar, 1/2 cup vegetable oil
Add the eggs one at a time, letting the first one fully incorporate into the batter before adding the next.
2 eggs
Turn the mixer down to the lowest speed. Gradually add the flour mixture until just incorporated, then the carrots.
Gently fold in the carrots, shredded coconut, nuts and raisins, if using, with a silicone spatula.
3 medium carrots, 1/3 cup sweetened coconut shreds, 1/3 cup walnuts, 1/3 cup raisins
Fill each cupcake liner 2/3rds full with batter.
Bake for 12-14 minutes or until a toothpick inserted into the center comes out clean.
Allow to cool before frosting.