mirror of
https://github.com/CesiumGS/obj2gltf.git
synced 2024-11-27 02:24:04 -05:00
commit
bbdecdece2
40
gulpfile.js
40
gulpfile.js
@ -1,6 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
var Cesium = require('cesium');
|
||||
var Promise = require('bluebird');
|
||||
var child_process = require('child_process');
|
||||
var fsExtra = require('fs-extra');
|
||||
var gulp = require('gulp');
|
||||
@ -60,3 +61,42 @@ gulp.task('coverage', function () {
|
||||
});
|
||||
open('coverage/lcov-report/index.html');
|
||||
});
|
||||
|
||||
|
||||
gulp.task('cloc', function() {
|
||||
var cmdLine;
|
||||
var clocPath = path.join('node_modules', 'cloc', 'lib', 'cloc');
|
||||
|
||||
//Run cloc on primary Source files only
|
||||
var source = new Promise(function(resolve, reject) {
|
||||
cmdLine = 'perl ' + clocPath + ' --quiet --progress-rate=0' +
|
||||
' lib/ bin/';
|
||||
|
||||
child_process.exec(cmdLine, function(error, stdout, stderr) {
|
||||
if (error) {
|
||||
console.log(stderr);
|
||||
return reject(error);
|
||||
}
|
||||
console.log('Source:');
|
||||
console.log(stdout);
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
|
||||
//If running cloc on source succeeded, also run it on the tests.
|
||||
return source.then(function() {
|
||||
return new Promise(function(resolve, reject) {
|
||||
cmdLine = 'perl ' + clocPath + ' --quiet --progress-rate=0' +
|
||||
' specs/lib/';
|
||||
child_process.exec(cmdLine, function(error, stdout, stderr) {
|
||||
if (error) {
|
||||
console.log(stderr);
|
||||
return reject(error);
|
||||
}
|
||||
console.log('Specs:');
|
||||
console.log(stdout);
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -35,6 +35,7 @@
|
||||
"yargs": "^10.0.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"cloc": "^2.3.3",
|
||||
"coveralls": "^3.0.0",
|
||||
"eslint": "^4.4.1",
|
||||
"eslint-config-cesium": "^2.0.1",
|
||||
@ -52,7 +53,8 @@
|
||||
"test": "gulp test",
|
||||
"test-watch": "gulp test-watch",
|
||||
"coverage": "gulp coverage",
|
||||
"coveralls": "cat ./coverage/lcov.info | ./node_modules/.bin/coveralls"
|
||||
"coveralls": "cat ./coverage/lcov.info | ./node_modules/.bin/coveralls",
|
||||
"cloc": "gulp cloc"
|
||||
},
|
||||
"bin": {
|
||||
"obj2gltf": "./bin/obj2gltf.js"
|
||||
|
Loading…
Reference in New Issue
Block a user