This commit is contained in:
Johann-S 2017-11-21 10:01:19 +01:00 коммит произвёл XhmikosR
Родитель 4ca78706a6
Коммит f62a1fbe48
2 изменённых файлов: 27 добавлений и 31 удалений

Просмотреть файл

@ -1,30 +1,32 @@
/* eslint-env node */
/* eslint-env node, es6 */
'use strict';
var os = require('os');
var glob = require('glob');
var async = require('async');
var qunit = require('node-qunit-phantomjs');
const os = require('os');
const glob = require('glob');
const async = require('async');
const qunit = require('node-qunit-phantomjs');
var THREADS = os.cpus().length <= 2 ? 1 : os.cpus().length / 2;
const cpus = os.cpus().length;
const THREADS = cpus <= 2 ? 1 : cpus / 2;
var ignores = [
const ignore = [
'test/fixtures/jquery/missing.html',
'test/fixtures/jquery/and_bs_js_both_missing.html',
'test/fixtures/charset/not-utf8.html'
];
glob('test/fixtures/**/*.html', {ignore: ignores}, function (err, files) {
glob('test/fixtures/**/*.html', {ignore}, (err, files) => {
if (err) {
throw err;
}
async.eachLimit(files,
THREADS,
function (file, callback) {
(file, callback) => {
qunit(file, {timeout: 10}, callback);
}, function (er) {
},
(er) => {
if (er) {
throw er;
}

Просмотреть файл

@ -1,28 +1,22 @@
/* This file is taken from <https://github.com/twbs/bootstrap/blob/v4-dev/build/stamp.js>
and adapted for Bootlint.
*/
// This file is taken from Bootstrap and adapted for Bootlint.
/* eslint-env node */
/* eslint-env node, es6 */
'use strict';
var fs = require('fs');
const path = require('path');
const pkg = require(path.resolve('package.json'));
const year = new Date().getFullYear();
fs.readFile('package.json', function (err, data) {
if (err) {
throw err;
}
const stampTop =
`/*!
* Bootlint v${pkg.version} (${pkg.homepage})
* ${pkg.description}
* Copyright (c) 2014-${year} The Bootlint Authors
* Licensed under the MIT License (https://github.com/twbs/bootlint/blob/master/LICENSE).
*/
var pkg = JSON.parse(data);
var year = new Date().getFullYear();
`;
var stampTop = '/*!\n * Bootlint v' + pkg.version + ' (' + pkg.homepage + ')\n' +
' * ' + pkg.description + '\n' +
' * Copyright (c) 2014-' + year + ' The Bootlint Authors\n' +
' * Licensed under the MIT License (https://github.com/twbs/bootlint/blob/master/LICENSE).\n' +
' */\n';
process.stdout.write(stampTop);
process.stdin.pipe(process.stdout);
});
process.stdout.write(stampTop);
process.stdin.pipe(process.stdout);