htdocs:
* update deps * use double quotes and fix warnings
This commit is contained in:
parent
9ff204f8bc
commit
53bf8308fa
|
@ -1,9 +1,7 @@
|
|||
{
|
||||
"node" : true,
|
||||
"browser" : false,
|
||||
|
||||
"bitwise": true,
|
||||
"boss": true,
|
||||
"browser": false,
|
||||
"camelcase": true,
|
||||
"curly": true,
|
||||
"eqeqeq": true,
|
||||
|
@ -11,8 +9,10 @@
|
|||
"latedef": true,
|
||||
"multistr": true,
|
||||
"noarg": true,
|
||||
"node": true,
|
||||
"noempty": true,
|
||||
"plusplus": false,
|
||||
"quotmark": "double",
|
||||
"regexp": true,
|
||||
"shelljs": true,
|
||||
"strict": false,
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
/*! Inspired by: http://aboutcode.net/2010/11/11/list-github-projects-using-javascript.html */
|
||||
|
||||
/* jshint quotmark:true, jquery:true */
|
||||
|
||||
jQuery.fn.listCommits = function(username, repository, branch) {
|
||||
this.html('<span>Querying GitHub for recent commits…</span>');
|
||||
|
||||
|
@ -26,7 +28,7 @@ jQuery.fn.listCommits = function(username, repository, branch) {
|
|||
});
|
||||
|
||||
function cutLines(message) {
|
||||
var lineFeed = message.indexOf("\n");
|
||||
var lineFeed = message.indexOf('\n');
|
||||
|
||||
if (lineFeed > -1) {
|
||||
return message.slice(0, lineFeed);
|
||||
|
|
|
@ -17,13 +17,13 @@
|
|||
*/
|
||||
|
||||
(function () {
|
||||
'use strict';
|
||||
"use strict";
|
||||
|
||||
require('shelljs/make');
|
||||
var fs = require('fs'),
|
||||
cleanCSS = require('clean-css'),
|
||||
UglifyJS = require('uglify-js'),
|
||||
ROOT_DIR = __dirname + '/'; // absolute path to project's root
|
||||
require("shelljs/make");
|
||||
var fs = require("fs"),
|
||||
cleanCSS = require("clean-css"),
|
||||
UglifyJS = require("uglify-js"),
|
||||
ROOT_DIR = __dirname + "/"; // absolute path to project's root
|
||||
|
||||
//
|
||||
// make minify
|
||||
|
@ -35,9 +35,9 @@
|
|||
|
||||
// pack.css
|
||||
|
||||
var inCss = cat(['css/all.css',
|
||||
'css/demo.css',
|
||||
'css/normalize.css'
|
||||
var inCss = cat(["css/all.css",
|
||||
"css/demo.css",
|
||||
"css/normalize.css"
|
||||
]);
|
||||
|
||||
var packCss = cleanCSS.process(inCss, {
|
||||
|
@ -45,16 +45,16 @@
|
|||
keepSpecialComments: 0
|
||||
});
|
||||
|
||||
fs.writeFileSync('css/pack.css', packCss, 'utf8');
|
||||
fs.writeFileSync("css/pack.css", packCss, "utf8");
|
||||
|
||||
echo();
|
||||
echo('### Finished' + ' ' + 'css/pack.css' + '.');
|
||||
echo("### Finished" + " " + "css/pack.css" + ".");
|
||||
|
||||
echo();
|
||||
echo("### Minifying js files...");
|
||||
|
||||
var inJs = cat(['js/github.js',
|
||||
'js/picnet.table.filter.min.js']);
|
||||
var inJs = cat(["js/github.js",
|
||||
"js/picnet.table.filter.min.js"]);
|
||||
|
||||
var minifiedJs = UglifyJS.minify(inJs, {
|
||||
compress: true,
|
||||
|
@ -63,10 +63,10 @@
|
|||
warnings: false
|
||||
});
|
||||
|
||||
fs.writeFileSync('js/pack.js', minifiedJs.code, 'utf8');
|
||||
fs.writeFileSync("js/pack.js", minifiedJs.code, "utf8");
|
||||
|
||||
echo();
|
||||
echo('### Finished' + ' ' + 'js/pack.js' + '.');
|
||||
echo("### Finished" + " " + "js/pack.js" + ".");
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "cppcheck-web",
|
||||
"version": "0.1.1",
|
||||
"version": "0.1.2",
|
||||
"author": "XhmikosR (https://github.com/XhmikosR)",
|
||||
"description": "The dependencies to build cppcheck's website",
|
||||
"homepage": "https://github.com/danmar/cppcheck",
|
||||
|
@ -19,9 +19,9 @@
|
|||
"lint": "node run-tests"
|
||||
},
|
||||
"dependencies": {
|
||||
"clean-css": "~1.0.10",
|
||||
"clean-css": "~1.0.12",
|
||||
"csslint": "~0.9.10",
|
||||
"jshint": "~2.1.4",
|
||||
"jshint": "~2.1.5",
|
||||
"shelljs": "~0.1.4",
|
||||
"uglify-js": "~2.3.6"
|
||||
},
|
||||
|
|
|
@ -18,25 +18,25 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
require('shelljs/global');
|
||||
require("shelljs/global");
|
||||
|
||||
cd(__dirname);
|
||||
|
||||
//
|
||||
// JSHint
|
||||
//
|
||||
JSHINT_BIN = './node_modules/jshint/bin/jshint';
|
||||
var jshintBin = "./node_modules/jshint/bin/jshint";
|
||||
|
||||
if (!test('-f', JSHINT_BIN)) {
|
||||
echo('JSHint not found. Run `npm install` in the root dir first.');
|
||||
if (!test("-f", jshintBin)) {
|
||||
echo("JSHint not found. Run `npm install` in the root dir first.");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (exec('node' +' ' + JSHINT_BIN +' ' + 'make.js run-tests.js').code !== 0) {
|
||||
echo('*** JSHint failed! (return code != 0)');
|
||||
if (exec("node" + " " + jshintBin + " " + "make.js run-tests.js js/github.js").code !== 0) {
|
||||
echo("*** JSHint failed! (return code != 0)");
|
||||
echo();
|
||||
} else {
|
||||
echo('JSHint completed successfully');
|
||||
echo("JSHint completed successfully");
|
||||
echo();
|
||||
}
|
||||
|
||||
|
@ -44,14 +44,16 @@ if (exec('node' +' ' + JSHINT_BIN +' ' + 'make.js run-tests.js').code !== 0) {
|
|||
//
|
||||
// csslint
|
||||
//
|
||||
CSSLINT_BIN = './node_modules/csslint/cli.js';
|
||||
var csslintBin = "./node_modules/csslint/cli.js";
|
||||
|
||||
if (!test('-f', CSSLINT_BIN)) {
|
||||
echo('csslint not found. Run `npm install` in the root dir first.');
|
||||
if (!test("-f", csslintBin)) {
|
||||
echo("csslint not found. Run `npm install` in the root dir first.");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (exec('node' +' ' + CSSLINT_BIN +' ' + 'css/all.css').code !== 0) {
|
||||
echo('*** csslint failed! (return code != 0)');
|
||||
// csslint doesn't return proper error codes...
|
||||
/*if (exec("node" + " " + csslintBin + " " + "css/all.css").code !== 0) {
|
||||
echo("*** csslint failed! (return code != 0)");
|
||||
echo();
|
||||
}
|
||||
}*/
|
||||
exec("node" + " " + csslintBin + " " + "css/all.css");
|
||||
|
|
Loading…
Reference in New Issue