A generator for Yeoman which scaffolds a Doubleclick Studio HTML5 Ad
Trick question. It's not a thing. It's this guy:
Basically, he wears a top hat, lives in your computer, and waits for you to tell him what kind of application you wish to create.
Not every new computer comes with a Yeoman pre-installed. He lives in the npm package repository. You only have to ask for him once, then he packs up and moves into your hard drive. Make sure you clean up, he likes new and shiny things.
$ npm install -g yo
Yeoman travels light. He didn't pack any generators when he moved in. You can think of a generator like a plug-in. You get to choose what type of application you wish to create, such as a Backbone application or even a Chrome extension.
To install generator-doubleclick-studio from npm, run:
$ npm install -g generator-doubleclick-studio
Because we are using private repository, the above command won't work. The work around is this:
$ npm install /your/folder_path/to/generator-doubleclick-studio
Finally, initiate the generator:
$ yo doubleclick-studio
After entering the above command line, it will ask with these few questions:
[?] Which type do you want to create? In-page // (types are In-page and Expanding)
[?] Width? 320
[?] Height? 250
[?] Would you like to enable TweenLite.js? No
This will:
- Yeoman will scaffold your template
- Create .css with proper width/height
- will include or not the TweenLite.js.
You can now start developing in folder /dev
.
- /dev: Development directory
- /node_modules: node.js module
- /pub: Publishing catalog, generated by the "grunt build", for uploading to DC platform
- package.json: node.js dependencies
- Gruntfile.js: grunt profile
To test your build:
$ grunt serve
This will:
- open browser, with link:
http://localhost:9000/
. - Every edit/save you made inside of your project folder will automatically transmit to your browser(s).
- You can test in multiple browser in multiple devices.
To build your project for uploading to DC platform.
$ grunt build
This will:
- minify your .js and .css files
- optimize your .png, .gif, .jpg files
- put your ready for publish files in
/pub
folder.
Yeoman has a heart of gold. He's a person with feelings and opinions, but he's very easy to work with. If you think he's too opinionated, he can be easily convinced.
If you'd like to get to know Yeoman better and meet some of his friends, Grunt and Bower, check out the complete Getting Started Guide.