Rapid Application Development with Open Source Software

Next: Reduce Image Size UP: TOC

Runing Bootstrap means eliminating unused CSS declarations. This elimination could be implemented by using grunt uncss.

zypper install npm
Loading repository data...
Reading installed packages...
'npm' not found in package names. Trying capabilities.
Resolving package dependencies...
                                                                                                                                   
The following NEW package is going to be installed:
  nodejs 

1 new package to install.
Overall download size: 3.2 MiB. Already cached: 0 B  After the operation, additional 14.7 MiB will be used.
Continue? [y/n/? shows all options] (y): y
Retrieving package nodejs-0.10.31-2.1.7.i586                                                  (1/1),   3.2 MiB ( 14.7 MiB unpacked)
Retrieving: nodejs-0.10.31-2.1.7.i586.rpm .......................................................................[done (3.9 MiB/s)]
Checking for file conflicts: ................................................................................................[done]
(1/1) Installing: nodejs-0.10.31-2.1.7 ......................................................................................[done]

npm install -g grunt-cli
/usr/bin/grunt -> /usr/lib/node_modules/grunt-cli/bin/grunt
grunt-cli@0.1.13 /usr/lib/node_modules/grunt-cli
├── resolve@0.3.1
├── nopt@1.0.10 (abbrev@1.0.7)
└── findup-sync@0.1.3 (lodash@2.4.2, glob@3.2.11)
npm install grunt-uncss grunt-contrib-cssmin --save-dev
|
> phantomjs@1.9.17 install /root/node_modules/grunt-uncss/node_modules/uncss/node_modules/phridge/node_modules/phantomjs
> node install.js

PhantomJS detected, but wrong version 1.9.1 @ /usr/bin/phantomjs.
Downloading https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.8-linux-i686.tar.bz2
Saving to /root/node_modules/grunt-uncss/node_modules/uncss/node_modules/phridge/node_modules/phantomjs/phantomjs/phantomjs-1.9.8-linux-i686.tar.bz2
Receiving...
  [=====================-------------------] 53% 0.0s
Received 13200K total.
Extracting tar contents (via spawned process)
Removing /root/node_modules/grunt-uncss/node_modules/uncss/node_modules/phridge/node_modules/phantomjs/lib/phantom
Copying extracted folder /root/node_modules/grunt-uncss/node_modules/uncss/node_modules/phridge/node_modules/phantomjs/phantomjs/phantomjs-1.9.8-linux-i686.tar.bz2-extract-1437492856779/phantomjs-1.9.8-linux-i686 -> /root/node_modules/grunt-uncss/node_modules/uncss/node_modules/phridge/node_modules/phantomjs/lib/phantom
Writing location.js file
Done. Phantomjs binary available at /root/node_modules/grunt-uncss/node_modules/uncss/node_modules/phridge/node_modules/phantomjs/lib/phantom/bin/phantomjs
grunt-contrib-cssmin@0.12.3 node_modules/grunt-contrib-cssmin
├── chalk@1.1.0 (escape-string-regexp@1.0.3, ansi-styles@2.1.0, supports-color@2.0.0, strip-ansi@3.0.0, has-ansi@2.0.0)
├── clean-css@3.3.6 (commander@2.8.1, source-map@0.4.4)
└── maxmin@1.1.0 (figures@1.3.5, pretty-bytes@1.0.4, gzip-size@1.0.0)

grunt-uncss@0.4.3 node_modules/grunt-uncss
├── chalk@1.0.0 (escape-string-regexp@1.0.3, ansi-styles@2.1.0, supports-color@1.3.1, strip-ansi@2.0.1, has-ansi@1.0.3)
├── maxmin@1.1.0 (figures@1.3.5, pretty-bytes@1.0.4, gzip-size@1.0.0)
└── uncss@0.12.1 (is-absolute-url@1.0.0, commander@2.6.0, is-html@1.0.0, glob@4.4.2, bluebird@2.9.34, css@1.6.0, request@2.53.0, lodash@3.3.1, phridge@1.0.8)

Next: Reduce Image Size UP: TOC