-
Notifications
You must be signed in to change notification settings - Fork 469
Custom build
In order to build qTip2, you need to have Node.js 0.10.0 or later and grunt / grunt-cli 0.5 or later.
Head over to http://nodejs.org/ to grab the OS-specific installer for Node.js and the Node Package Manager.
- Test that grunt-cli is installed globally by running
grunt --version
at the command-line. - If grunt isn't installed globally, run
npm install -g grunt-cli
to install the latest version. You may need to run it usingsudo
. - From the root directory of this project, run
npm install
to install the needed dependancies.
Checkout dependencies (git submodules)
-
cd
into the checked-out qTip2 directory - Run
git submodule init
- Then
git submodule update
- Done!
First, clone a copy of the main qTip2 git repo by running
git clone git://github.com/Craga89/qTip2.git
Then, in the main directory of the distribution (the one that this file is in), type the following to build qTip2 and its accompanying CSS:
grunt
You can also create each individually using these commands:
grunt clean # Clean up the dist/ directory
grunt basic # Build qTip2 with no plugins included
grunt css # Build CSS files
grunt all # Build qTip2 twice, with no plugins and all plugins
To build and test the source code against JSHint/CSSLint, type this:
grunt dev
Finally, you can remove all the built files using the command:
grunt clean
By default qTip2 is built with all plugins enabled. You can see an example of this in the dist file. If you want more control over what plugins are included, you can do so by adding some extra parameters to your build commands.
For example, if you plan on using only the tips plugin, you'd specify the plugins variable as so:
grunt --plugins="tips" [command]
Notice the only thing that was added was the PLUGINS parameter. This tells the compiler which files to include in the final qTip2 build. You can specify multiple plugins by separating them with a space:
grunt --plugins="tips ajax viewport" [command]
By default all plugins are included in the build, so the regular [grunt all]
command is actually equivilent to:
grunt --plugins="ajax viewport tips imagemap svg modal bgiframe" [command]