improve plugin build script