Create HTML5 banners for AdWords from given images
npm install banner-generatorThis command line interface script makes the process a little bit more pleasant. It will create a production ready zip for AdWords from given images.
There was an added bonus by creating this application. It gave me the opportunity to experiment with Node.JS, command line interfaces and Promises.
bash
npm install banner-generator
`
`javascript
import bannerCreator from 'banner-generator';bannerCreator({
outputName: 'test',
format: '300x250',
files: ['1.png', '2.png'],
urls: ['http://www.site1.com/', 'http://www.site2.com/'],
template: 'swipe-gallery',
onComplete: () => {},
});
`Usage CLI
`bash
npm install banner-generator -gbanner-generator build -s 300x250 -f image1.png,image2.png -u http://www.example.com/
`Options CLI
`bash
banner-generator build --help Options:
-h, --help output usage information
-s, --size Format of the banner. e.g. 728x90 (required)
-f, --files List of files seperated by commas (required)
-u, --urls List of exit urls seperated by commas (required)
-o, --output Output filename (default: banners)
-t, --template Template name (default: swipe-gallery)
`Tests
`bash
npm test
``