corrected order of generated code.
added publish config.