1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | var path = require("path");
|
4 | var cordova_config_1 = require("../util/cordova-config");
|
5 |
|
6 |
|
7 |
|
8 | exports.LabAppView = function (req, res) {
|
9 | return res.sendFile('index.html', { root: path.join(__dirname, '..', '..', 'lab') });
|
10 | };
|
11 | exports.ApiCordovaProject = function (req, res) {
|
12 | cordova_config_1.buildCordovaConfig(function (err) {
|
13 | res.status(400).json({ status: 'error', message: 'Unable to load config.xml' });
|
14 | }, function (config) {
|
15 | res.json(config);
|
16 | });
|
17 | };
|
18 | exports.ApiPackageJson = function (req, res) {
|
19 | res.sendFile(path.join(process.cwd(), 'package.json'), {
|
20 | headers: {
|
21 | 'content-type': 'application/json'
|
22 | }
|
23 | });
|
24 | };
|