From ff854058872bc951f1dbdb4ae769ad2e2e71b117 Mon Sep 17 00:00:00 2001 From: Ecmel Ercan Date: Mon, 25 Jul 2016 14:59:59 +0300 Subject: [PATCH] Add progress --- extension.js | 18 +++++++++++------- package.json | 2 +- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/extension.js b/extension.js index 5f13352..45f6bd2 100644 --- a/extension.js +++ b/extension.js @@ -2,7 +2,7 @@ // (c) 2016 Ecmel Ercan -var vscode = require('vscode'); +var vsc = require('vscode'); var archiver = require('archiver'); var parse = require('parse-gitignore'); var fs = require('fs'); @@ -10,12 +10,12 @@ var path = require('path') function activate(context) { - var disposable = vscode.commands.registerCommand('extension.archive', function () { + var disposable = vsc.commands.registerCommand('extension.archive', function () { - var rootPath = vscode.workspace.rootPath; + var rootPath = vsc.workspace.rootPath; if (!rootPath) { - vscode.window.showErrorMessage('Archiver works for folders only.'); + vsc.window.showErrorMessage('Archiver works for folders only.'); return; } @@ -31,15 +31,19 @@ function activate(context) { var archive = archiver('zip'); output.on('error', function (err) { - vscode.window.showErrorMessage(err.message); + vsc.window.showErrorMessage(err.message); }); archive.on('error', function (err) { - vscode.window.showErrorMessage(err.message); + vsc.window.showErrorMessage(err.message); }); archive.on('end', function () { - vscode.window.showInformationMessage('Archived to ' + archivePath); + vsc.window.showInformationMessage('Archived to ' + archivePath); + }); + + archive.on('entry', function (entry) { + vsc.window.setStatusBarMessage('Archiving ' + entry.name, 1000); }); archive.pipe(output); diff --git a/package.json b/package.json index cac3a08..9e457b3 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "vscode-archiver", "displayName": "Archiver", "description": "Workspace folder archiver", - "version": "0.0.14", + "version": "0.0.15", "publisher": "ecmel", "license": "MIT", "homepage": "https://github.com/ecmel/vscode-archiver",