diff options
author | XhmikosR <xhmikosr@gmail.com> | 2017-08-09 15:22:38 +0300 |
---|---|---|
committer | XhmikosR <xhmikosr@gmail.com> | 2017-11-22 14:35:49 +0300 |
commit | 4fab68f58985fbdea960afb33489fb4072e6d0d7 (patch) | |
tree | 8f5b09c7252490b17e0e3ae6a03fd5ba5b9b5291 /build | |
parent | 16f427b6ef93f4a4d10387a4aab8d8b2f8f74e66 (diff) |
Remove Grunt and switch to npm scripts.
Diffstat (limited to 'build')
-rw-r--r-- | build/phantom.js | 32 | ||||
-rw-r--r-- | build/stamp.js | 28 |
2 files changed, 60 insertions, 0 deletions
diff --git a/build/phantom.js b/build/phantom.js new file mode 100644 index 0000000..6b81ab8 --- /dev/null +++ b/build/phantom.js @@ -0,0 +1,32 @@ +/* eslint-env node */ + +'use strict'; + +var os = require('os'); +var glob = require('glob'); +var async = require('async'); +var qunit = require('node-qunit-phantomjs'); + +var THREADS = os.cpus().length <= 2 ? 1 : os.cpus().length / 2; + +var ignores = [ + '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) { + if (err) { + throw err; + } + + async.eachLimit(files, + THREADS, + function (file, callback) { + qunit(file, {timeout: 10}, callback); + }, function (er) { + if (er) { + throw er; + } + }); +}); diff --git a/build/stamp.js b/build/stamp.js new file mode 100644 index 0000000..c150f27 --- /dev/null +++ b/build/stamp.js @@ -0,0 +1,28 @@ +/* This file is taken from <https://github.com/twbs/bootstrap/blob/v4-dev/build/stamp.js> + and adapted for Bootlint. + */ + +/* eslint-env node */ + +'use strict'; + +var fs = require('fs'); + +fs.readFile('package.json', function (err, data) { + if (err) { + throw err; + } + + 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); +}); |