mirror of
https://github.com/status-im/embark-area-51.git
synced 2025-02-02 02:15:58 +00:00
fix dir in contractsDirectory
This commit is contained in:
parent
9faf644c31
commit
b931efcf7d
@ -4,6 +4,8 @@ const Plugins = require('./plugins.js');
|
||||
const utils = require('../utils/utils.js');
|
||||
const path = require('path');
|
||||
|
||||
const httpContractDir = '.embark/contracts/';
|
||||
|
||||
var Config = function(options) {
|
||||
this.env = options.env;
|
||||
this.blockchainConfig = {};
|
||||
@ -188,8 +190,7 @@ Config.prototype.loadExternalContractsFiles = function() {
|
||||
}
|
||||
if (contract.file.startsWith('http') || contract.file.startsWith('git')) {
|
||||
const url = this.getExternalContractUrl(contract);
|
||||
// TODO put directory name somewhere else
|
||||
const localFile = utils.joinPath(process.cwd(), '.embark/contracts', path.basename(url));
|
||||
const localFile = httpContractDir + path.basename(url);
|
||||
this.contractsFiles.push(new File({filename: localFile, type: "http", basedir: '', path: url}));
|
||||
} else if (fs.existsSync(contract.file)) {
|
||||
this.contractsFiles.push(new File({filename: contract.file, type: "dapp_file", basedir: '', path: contract.file}));
|
||||
@ -258,6 +259,7 @@ Config.prototype.loadEmbarkConfigFile = function() {
|
||||
}).map((dir) => {
|
||||
return dir.split("*.")[0];
|
||||
});
|
||||
this.contractDirectories.push(httpContractDir);
|
||||
|
||||
this.buildDir = this.embarkConfig.buildDir;
|
||||
this.configDir = this.embarkConfig.config;
|
||||
|
@ -1,6 +1,5 @@
|
||||
let async = require('../../utils/async_extend.js');
|
||||
let SolcW = require('./solcW.js');
|
||||
const path = require('path');
|
||||
|
||||
class Solidity {
|
||||
|
||||
@ -26,8 +25,6 @@ class Solidity {
|
||||
let match = new RegExp("^" + directory);
|
||||
filename = filename.replace(match, '');
|
||||
}
|
||||
// TODO remove this and fix it
|
||||
filename = path.basename(filename);
|
||||
|
||||
file.content(function(fileContent) {
|
||||
if (!fileContent) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user