htdocs: minor tweaks.

Update the tools to their latest versions.
This commit is contained in:
XhmikosR 2013-11-05 08:03:31 +02:00
parent e9848bdc80
commit f40257c49e
6 changed files with 15 additions and 20 deletions

View File

@ -5,5 +5,5 @@ Getting started
* Install the node.js dependencies: `npm install` * Install the node.js dependencies: `npm install`
* Run `node make` or `node make minify` * Run `node make` or `node make minify`
You can run `npm run check` or `npm run lint` to run [JSHint](https://github.com/jshint/jshint) You can run `npm run lint` to run [JSHint](https://github.com/jshint/jshint)
and [csslint](https://github.com/stubbornella/csslint) for our files. and [csslint](https://github.com/stubbornella/csslint) for our files.

View File

@ -21,7 +21,7 @@
require("shelljs/make"); require("shelljs/make");
var fs = require("fs"), var fs = require("fs"),
cleanCSS = require("clean-css"), CleanCSS = require("clean-css"),
UglifyJS = require("uglify-js"), UglifyJS = require("uglify-js"),
rootDir = __dirname + "/"; // absolute path to project's root rootDir = __dirname + "/"; // absolute path to project's root
@ -34,18 +34,17 @@
echo("### Minifying css files..."); echo("### Minifying css files...");
// pack.css // pack.css
var inCss = cat(["site/css/normalize.css", var inCss = cat(["site/css/normalize.css",
"site/css/all.css", "site/css/all.css",
"site/css/demo.css" "site/css/demo.css"
]); ]);
var packCss = cleanCSS.process(inCss, { var minifier = new CleanCSS({
removeEmpty: true, keepSpecialComments: 0,
keepSpecialComments: 0 selectorsMergeMode: "ie8"
}); });
fs.writeFileSync("site/css/pack.css", packCss, "utf8"); fs.writeFileSync("site/css/pack.css", minifier.minify(inCss), "utf8");
echo(); echo();
echo("### Finished site/css/pack.css."); echo("### Finished site/css/pack.css.");

View File

@ -1,6 +1,6 @@
{ {
"name": "cppcheck-web", "name": "cppcheck-web",
"version": "0.1.4", "version": "0.2.0",
"author": "XhmikosR (https://github.com/XhmikosR)", "author": "XhmikosR (https://github.com/XhmikosR)",
"description": "The dependencies to build cppcheck's website", "description": "The dependencies to build cppcheck's website",
"homepage": "https://github.com/danmar/cppcheck", "homepage": "https://github.com/danmar/cppcheck",
@ -13,17 +13,15 @@
}, },
"license": "GPLv3", "license": "GPLv3",
"main": "make.js", "main": "make.js",
"readmeFilename": "Readme.md",
"scripts": { "scripts": {
"check": "node run-tests",
"lint": "node run-tests" "lint": "node run-tests"
}, },
"dependencies": { "dependencies": {
"clean-css": "~1.1.1", "clean-css": "~2.0.0",
"csslint": "~0.9.10", "csslint": "~0.9.10",
"jshint": "~2.1.11", "jshint": "~2.3.0",
"shelljs": "~0.2.6", "shelljs": "~0.2.6",
"uglify-js": "~2.4.0" "uglify-js": "~2.4.2"
}, },
"jshintConfig": { "jshintConfig": {
"bitwise": true, "bitwise": true,
@ -38,9 +36,7 @@
"noarg": true, "noarg": true,
"node": true, "node": true,
"noempty": true, "noempty": true,
"plusplus": false,
"quotmark": "double", "quotmark": "double",
"regexp": true,
"shelljs": true, "shelljs": true,
"strict": true, "strict": true,
"trailing": true, "trailing": true,

File diff suppressed because one or more lines are too long

View File

@ -24,9 +24,9 @@ jQuery.fn.listCommits = function(username, repository, branch) {
var shortMessage = htmlEntities(cutLines(this.commit.message)); var shortMessage = htmlEntities(cutLines(this.commit.message));
if (this.author !== null) { if (this.author !== null) {
list.append('<li><a href="' + githubUrl + '">' + shortMessage + '</a><em> by <strong><a class="author" href="' + 'https://github.com/' + this.author.login + '">' + this.author.login + '</a></strong></em></li>'); list.append('<li><a href="' + githubUrl + '">' + shortMessage + '</a> <em>by <strong><a class="author" href="' + 'https://github.com/' + this.author.login + '">' + this.author.login + '</a></strong></em></li>');
} else { } else {
list.append('<li><a href="' + githubUrl + '">' + shortMessage + '</a><em> by <strong>' + this.commit.author.name + '</strong></em></li>'); list.append('<li><a href="' + githubUrl + '">' + shortMessage + '</a> <em>by <strong>' + this.commit.author.name + '</strong></em></li>');
} }
if (i === 9) { if (i === 9) {

File diff suppressed because one or more lines are too long