mirror of
https://github.com/status-im/embark-area-51.git
synced 2025-01-11 14:34:40 +00:00
make linter happy
This commit is contained in:
parent
c0bc6e1b7c
commit
483a0b01e1
@ -56,9 +56,6 @@ class TemplateGenerator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getExternalProject(uri) {
|
getExternalProject(uri) {
|
||||||
const constants = require('../constants');
|
|
||||||
const RAW_URL = 'https://github.com/';
|
|
||||||
|
|
||||||
let match = uri.match(
|
let match = uri.match(
|
||||||
/\.[a-z]+\/([-a-zA-Z0-9@:%_+.~#?&\/=]+)/
|
/\.[a-z]+\/([-a-zA-Z0-9@:%_+.~#?&\/=]+)/
|
||||||
);
|
);
|
||||||
@ -66,17 +63,17 @@ class TemplateGenerator {
|
|||||||
let url, folder;
|
let url, folder;
|
||||||
|
|
||||||
if (uri.startsWith('http')) {
|
if (uri.startsWith('http')) {
|
||||||
url = uri + "/archive/master.zip"
|
url = uri + "/archive/master.zip";
|
||||||
folder = match[1]
|
folder = match[1];
|
||||||
} else if (uri.startsWith('github')) {
|
} else if (uri.startsWith('github')) {
|
||||||
url = "https://" + uri + "/archive/master.zip"
|
url = "https://" + uri + "/archive/master.zip";
|
||||||
folder = match[1]
|
folder = match[1];
|
||||||
} else if (uri.split('/').length === 2) {
|
} else if (uri.split('/').length === 2) {
|
||||||
url = "https://github.com/" + uri + "/archive/master.zip"
|
url = "https://github.com/" + uri + "/archive/master.zip";
|
||||||
folder = uri
|
folder = uri;
|
||||||
} else if (uri.indexOf('/') === -1) {
|
} else if (uri.indexOf('/') === -1) {
|
||||||
url = "https://github.com/embark-framework/embark-" + uri + "-template/archive/master.zip"
|
url = "https://github.com/embark-framework/embark-" + uri + "-template/archive/master.zip";
|
||||||
folder = "embark-framework/embark-" + uri + "-template"
|
folder = "embark-framework/embark-" + uri + "-template";
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
@ -179,8 +179,7 @@ function extractTar(filename, packageDirectory, cb) {
|
|||||||
function extractZip(filename, packageDirectory, cb) {
|
function extractZip(filename, packageDirectory, cb) {
|
||||||
const decompress = require('decompress');
|
const decompress = require('decompress');
|
||||||
|
|
||||||
decompress(filename, packageDirectory).then(files => {
|
decompress(filename, packageDirectory).then((_files) => {
|
||||||
console.log('done!');
|
|
||||||
cb();
|
cb();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user