Implement library.generateApp