The AdHub Dev Server helps you create your AdHub template locally before uploading it to the AdHub. It can also package your template up for distributing a single banner.
- Log in to the NPM website. If you don't have an NPM account, create one here.
- Check to see if you have access to the Hook Organization on NPM. If not, ask an admin for an invite.
- Make sure you are logged into npm commandline tool. Using Powershell or Terminal run
npm login
- Install the AdHub Dev Server npm package:
- Windows:
npm install -g adhubserver
- Mac:
sudo npm install -g adhubserver --unsafe-perm=true --allow-root
- Windows:
- To update just run the same command above.
- Download the latest release of the AdHub Standard Ad Template here: https://github.com/hookerz/000_AdHub_Standard_Template/archive/master.zip
- Extract the files to a directory on your computer.
- Open your template directory in PowerShell or Terminal.
- Run
adhubserver
. This will start up the AdHub Dev Server and open a window. Saving changes will reload the browser window.- Options:
-
-x, --xml
: Transpile content.html into content.xml
-
- Options:
- Open PowerShell or Terminal and run
adhuboptimize <output directory> [source directory]
- Arguments:
-
<output directory>
required Where a timestamped directory will be created with your finalized banner files. This directory can't inside the template directory. - `[source directory] optional The directory where the source files of your tempalte are located. If you don't provide it, the program will default to your current directory.
-
- Options:
-
-k <string>
or--tinykey <string>
- api key to use tinypng, this it cached after first use. You have to do this at least once for your images to minify. -
-t
or--nohtml
- skip html minification -
-a
or--adobe
- project uses Hook Adobe Animate instead of Standard Template -
-j
or--nojs
- skip js minification -
-c
or--nocss
- skip css minification -
-i
or--noimg
- skip image minification -
-b
or--nobundle
- skip bundling - no zip, no static image -
--zipsize <number>
- Maximum allowed size of the zips when testing: Default 150K -
--jpgsize <number>
- Maximum allowed size of the static backups when testing: Default 40K -
--itteratetiny <number>
- Number of Times to run TinyPng on Images': Default 2 -
-f --filter <string>
- Filter units by folder names or size. Use | for multiple filters. filters like 300x250 are size filters all others are folder filters
-
- Arguments:
- The program will run recursively on the source directory so it can run 100s of banners at a time.
- Test output is color coded and written to your terminal.
- Output and Source paths can be relative or absolute.
- Output directory cannot be inside Source directory,