Skip to content
This repository has been archived by the owner on Jan 14, 2022. It is now read-only.

Commit

Permalink
Remove unused code and hwa dependency (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
Esteban Lopez authored and am385 committed Jun 30, 2016
1 parent ac3abdc commit 08cb04d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 36 deletions.
37 changes: 2 additions & 35 deletions lib/platform.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,13 @@ var fs = require('fs'),
path = require('path'),
util = require('util');

var hwa = require('hwa'),
Q = require('q');
var Q = require('q');

var lib = require('manifoldjs-lib');

var CustomError = lib.CustomError,
fileTools = lib.fileTools,
PlatformBase = lib.PlatformBase,
projectTools = lib.projectTools,
utils = lib.utils;
PlatformBase = lib.PlatformBase;

var constants = require('./constants'),
manifest = require('./manifest'),
Expand Down Expand Up @@ -190,36 +187,6 @@ function Platform (packageName, platforms) {
})
.nodeify(callback);
};

self.run = function (projectDir, options, callback) {
if (!utils.isWindows) {
return Q.reject(new Error('Windows projects can only be executed in Windows environments.')).nodeify(callback);
}

try {
self.info('Launching the ' + constants.platform.name + ' app...');

var platformDir = path.join(projectDir || process.cwd(), constants.platform.id);
var manifestPath = path.join(platformDir, 'manifest', 'appxmanifest.xml');

// register and launch app
hwa.registerApp(manifestPath);
return Q.resolve().nodeify(callback);
}
catch (err) {
return Q.reject(err).nodeify(callback);
}
};

self.open = function (projectDir, options, callback) {
if (process.platform !== 'win32') {
return Q.reject(new Error('Visual Studio projects can only be opened in Windows environments.')).nodeify(callback);
}

var platformDir = path.join(projectDir || process.cwd(), constants.platform.id);
var projectFilename = path.join(platformDir, 'source', 'App.jsproj');
return projectTools.openVisualStudioProject(projectFilename).nodeify(callback);
};
}

util.inherits(Platform, PlatformBase);
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
"archiver": "^0.20.0",
"cloudappx-server": "^0.0.5",
"request": "^2.67.0",
"hwa": "^0.0.7",
"manifoldjs-lib": "^1.0.0"
},
"devDependencies": {
Expand Down

0 comments on commit 08cb04d

Please sign in to comment.