add publish script for component and bower

as discussed in #1903