mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-22 00:19:24 +03:00
Merge pull request #10126 from atom/as-ci-times
Print steps time during Grunt tasks and script/bootstrap
This commit is contained in:
commit
018b12973c
@ -14,6 +14,8 @@ _ = require 'underscore-plus'
|
||||
packageJson = require '../package.json'
|
||||
|
||||
module.exports = (grunt) ->
|
||||
require('time-grunt')(grunt)
|
||||
|
||||
grunt.loadNpmTasks('grunt-babel')
|
||||
grunt.loadNpmTasks('grunt-coffeelint')
|
||||
grunt.loadNpmTasks('grunt-lesslint')
|
||||
|
@ -37,6 +37,7 @@
|
||||
"runas": "^3.1",
|
||||
"tello": "1.0.5",
|
||||
"temp": "~0.8.1",
|
||||
"time-grunt": "1.2.2",
|
||||
"underscore-plus": "1.x",
|
||||
"unzip": "~0.1.9",
|
||||
"vm-compatibility-layer": "~0.1.0",
|
||||
|
@ -5,8 +5,16 @@ var verifyRequirements = require('./utils/verify-requirements');
|
||||
var safeExec = require('./utils/child-process-wrapper.js').safeExec;
|
||||
var path = require('path');
|
||||
|
||||
var t0, t1
|
||||
|
||||
// Executes an array of commands one by one.
|
||||
function executeCommands(commands, done, index) {
|
||||
if (index != undefined) {
|
||||
t1 = Date.now()
|
||||
console.log("=> Took " + (t1 - t0) + "ms.");
|
||||
console.log();
|
||||
}
|
||||
|
||||
index = (index == undefined ? 0 : index);
|
||||
if (index < commands.length) {
|
||||
var command = commands[index];
|
||||
@ -17,6 +25,7 @@ function executeCommands(commands, done, index) {
|
||||
options = command.options;
|
||||
command = command.command;
|
||||
}
|
||||
t0 = Date.now()
|
||||
safeExec(command, options, executeCommands.bind(this, commands, done, index + 1));
|
||||
}
|
||||
else
|
||||
@ -96,7 +105,10 @@ function bootstrap() {
|
||||
message: 'Installing apm...',
|
||||
options: apmInstallOptions
|
||||
},
|
||||
apmPath + ' clean' + apmFlags,
|
||||
{
|
||||
command: apmPath + ' clean' + apmFlags,
|
||||
message: 'Deleting old packages...'
|
||||
},
|
||||
moduleInstallCommand,
|
||||
dedupeApmCommand + ' ' + packagesToDedupe.join(' '),
|
||||
];
|
||||
|
Loading…
Reference in New Issue
Block a user